flectra/addons/base_branch_company/security/branch_security.xml

24 lines
946 B
XML
Raw Normal View History

2018-01-16 13:51:36 +01:00
<?xml version="1.0" encoding="utf-8"?>
2018-01-22 14:28:04 +01:00
<flectra>
2018-01-16 13:51:36 +01:00
<record id="branch_comp_rule" model="ir.rule">
<field name="name">Branch</field>
<field name="model_id" ref="model_res_branch"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="ir_rule_branch_allowed"
model="ir.rule">
<field name="model_id" ref="model_res_branch"/>
<field name="domain_force">['|', ('id','=',user.default_branch_id.id), ('id','in',[g.id for g in user.branch_ids])]
</field>
<field name="name">Allowed Branch</field>
<field name="global" eval="True"/>
</record>
2018-01-22 14:28:04 +01:00
<record model="res.groups" id="group_multi_branch">
<field name="name">Multi Branch</field>
<field name="category_id" ref="base.module_category_usability"/>
</record>
2018-01-16 13:51:36 +01:00
</flectra>