Help with user permission

Please help with setting permissions for users.
How we can implement this:

  • user 1 has user permission for branch 1

  • user 2 has user permission for branch 2

  • user 3 has user permission for branch 3.

  • customer 1 is linked with branch 1 - user 1 sees it, but users 2 and 3 do not see;

  • customer 2 is linked with branch 1 and 2 - users 1 and 2 see it, but user 3 does not see it.

I tried create Child Table for Branch DocType and add this Child Table DocType to Customer DocType as Table field. But user permission does not work on this.

1 Like

Is Table MultiSelect present in ERPNext v11.1.4?

Got it with document hooks permission_query_conditions and has_permission, child table doctype and custom field type table in origin doctypes.

@ukp can you share how you applied permissions for child table,
i’ve exactly same problem.