Skip to content

Commit

Permalink
[IMP] sale_commission_agent_restrict: Access rules
Browse files Browse the repository at this point in the history
Agent can access its own partner, the partners it creates or the ones it is agent for
  • Loading branch information
SirTakobi committed Aug 30, 2022
1 parent 242d3fb commit e664491
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sale_commission_agent_restrict/security/security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
<field name="model_id" ref="base.model_res_partner" />
<field name="groups" eval="[(4,ref('group_agent_own_customers'))]" />
<field name="domain_force">[
'|','|','|','|',
('id', 'child_of', user.partner_id.child_ids.ids),
('user_ids', 'in', user.company_id.user_ids.ids),
('agents', 'in', user.partner_id.ids),
('active', '=', False),
('create_uid', '=', user.id)]</field>
'|',
('id', 'child_of', user.partner_id.id),
'|',
('create_uid', '=', user.id),
('agents', 'in', user.partner_id.ids),
]</field>
<field name="perm_create" eval="False" />
<field name="perm_write" eval="False" />
</record>
Expand Down

0 comments on commit e664491

Please sign in to comment.