Restrict Sales Invoice Based on Warehouse Permissions in Sales Invoice

I’m setting up a basic user permission scenario where users are restricted to specific warehouses. I want users to see only those Sales Invoices where the Sales Invoice Item warehouse matches their allowed warehouse.

However, with “Apply Strict User Permissions” enabled, no invoices are visible. With it disabled, all invoices are visible, even those the user shouldn’t access. In both cases, trying to open a restricted invoice results in a permission error due to warehouse restriction.

Hi,

You’re encountering a permissions issue with Sales Invoices due to how Strict User Permission interacts with blank fields.

When Strict User Permission is enabled and User Permission is defined for a DocType (like Sales Invoice), any documents with a blank value in the linked permission field won’t be visible to that user.

In your Sales Invoices, the Warehouse field in the header is blank. This is why users with strict permissions can’t see these invoices in the List View. Users without strict permissions can see them in the List View but can’t open them, as they lack permission for the Warehouse specified in the child table.

To resolve this and filter invoices in the List View by Warehouse, ensure the Warehouse field in the Sales Invoice header is always populated.

Thanks,

Divyesh M.

Thank you for your response.

In my case, the “Update Stock” option is not checked on the Sales Invoices, so the Warehouse field on the main invoice remains empty. However, the “warehouse” field is set at the Sales Invoice Item level.

Despite this, I can still see the records listed on the Sales Invoice list view, but I’m unable to access/open those records.

I suspect this might be because the permissions in listing are checked at Sales Invoice (parent) level and not at Sales Invoice Item (child) level.