Restricted user to specific company can't create selling document when credit limit is populated for all companies

I have three companies (A, B, C) in my database.

I have many users (employees). each user have access restriction to one company only.

I setted for each customer a credit limit for companies A, B and C.

Now, when i create a sale invoice (or sale order) with user account X who has access permissions to company A only, and i try to select a customer, i recieve a blocking message saying :

" Not authorized for company : B in line 1. Restricted field: company
User X doesn’t have access permission to this document.
Not authorized for company B"

It is clear that the user X can not read the credit limit for companies B and C because he has not the permission to do so.
But logically , erpnext should ignore the credit limit information for other companies B and C for this user.

1 Like

Any solution for this issue please ?

Other description on this link

1 Like

Hi Same Issue here. Is any Solution for this below Error.
Not Allowed for Company : XXXXX in row 1. Restricted field: Company User XXXX does not have access to this document.
Insufficient Permission for Customer XXXX

Please help. Thanks

For anyone still looking for a solution. This worked for me.
User Permissions > allowed for company > in value (company name) > uncheck apply to all documents > and select either supplier or customer

i did this, but this will show whole company list in open which I want to hide other company names from a user except the assigned company.