<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">

    <record id="group_mrp_manager" model="res.groups">
        <field name="name">Manufacturing / Manager</field>
    </record>
    <record id="group_mrp_user" model="res.groups">
        <field name="name">Manufacturing / User</field>
    </record>


	<!-- restrict access to menu -->
	<record model='ir.ui.menu' id="mrp_Sched_all">
		<field eval="[(6,0,[ref('group_mrp_manager')])]" name="groups_id"/>
  	</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>

</data>
</openerp>
