flectra/addons/mrp/security/mrp_security.xml
2018-01-17 19:59:30 +05:30

59 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="0">
<record id="group_mrp_user" model="res.groups">
<field name="name">User</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="category_id" ref="base.module_category_manufacturing"/>
</record>
<record id="group_mrp_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="base.module_category_manufacturing"/>
<field name="implied_ids" eval="[(4, ref('group_mrp_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</data>
<data noupdate="1">
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('mrp.group_mrp_manager'))]"/>
</record>
<!-- Multi -->
<record model="ir.rule" id="mrp_production_rule">
<field name="name">mrp_production multi-company</field>
<field name="model_id" search="[('model','=','mrp.production')]" model="ir.model"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
</record>
<record model="ir.rule" id="mrp_workcenter_rule">
<field name="name">mrp_workcenter multi-company</field>
<field name="model_id" search="[('model','=','mrp.workcenter')]" model="ir.model"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
</record>
<record model="ir.rule" id="mrp_bom_rule">
<field name="name">mrp_bom multi-company</field>
<field name="model_id" search="[('model','=','mrp.bom')]" model="ir.model"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
</record>
<record model="ir.rule" id="mrp_routing_rule">
<field name="name">mrp_routing multi-company</field>
<field name="model_id" search="[('model','=','mrp.routing')]" model="ir.model"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
</record>
<record model="ir.rule" id="mrp_routing_workcenter_rule">
<field name="name">mrp_routing_workcenter multi-company</field>
<field name="model_id" search="[('model','=','mrp.routing.workcenter')]" model="ir.model"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
</record>
</data>
</flectra>