Inter Company Invoice permissions lock scenario problem

while using company tree such as
A
B
–C
–D

while C and D buy from B only, when creating supplier B and customers C and D, when creating inter company invoice (sales → purchase) neither of C or D can access their purchase invoices because of permessions restriction (When C open purchase invoice from B it says C doesn’t have permissions for company D) and D can’t open it also (D can’t access company C).

You can create user permission
User of Company C
Allow: Company
For Value: Company D
uncheck Apply To All Document Types and
Applicable For: Supplier

repeat it if you have company E, F, G and for all company users