<?xml version="1.0" encoding="utf-8"?>
<terp>
    <data noupdate="1">
        
        <record id="group_purchase_manager" model="res.groups">
            <field name="name">Purchase Manager</field>
        </record>
        
        <record id="base.user_admin" model="res.users">
            <field eval="[(4 ,ref('group_purchase_manager'))]" name="groups_id"/>
        </record>
        
        <record id="ir_model_access_stockmove0" model="ir.model.access">
            <field model="ir.model" name="model_id" search="[('name','=','Stock Move')]"/>
            <field eval="1" name="perm_read"/>
            <field eval="&quot;Stock Move&quot;" name="name"/>
            <field eval="0" name="perm_unlink"/>
            <field eval="1" name="perm_write"/>
            <field eval="1" name="perm_create"/>
            <field name="group_id" ref="purchase.group_purchase_manager"/>
        </record>
        
        <record id="ir_model_access_accountinvoice0" model="ir.model.access">
            <field model="ir.model" name="model_id" search="[('name','=','Invoice')]"/>
            <field eval="1" name="perm_read"/>
            <field eval="&quot;Account Invoice&quot;" name="name"/>
            <field eval="0" name="perm_unlink"/>
            <field eval="1" name="perm_write"/>
            <field eval="1" name="perm_create"/>
            <field name="group_id" ref="purchase.group_purchase_manager"/>
        </record>
        
        <record id="ir_model_access_accountinvoiceline0" model="ir.model.access">
            <field model="ir.model" name="model_id" search="[('name','=','Invoice line')]"/>
            <field eval="1" name="perm_read"/>
            <field eval="&quot;Account Invoice Line&quot;" name="name"/>
            <field eval="0" name="perm_unlink"/>
            <field eval="0" name="perm_write"/>
            <field eval="1" name="perm_create"/>
            <field name="group_id" ref="purchase.group_purchase_manager"/>
        </record>
        
        <record id="ir_model_access_accountinvoicetax0" model="ir.model.access">
            <field model="ir.model" name="model_id" search="[('name','=','Invoice Tax')]"/>
            <field eval="1" name="perm_read"/>
            <field eval="&quot;Account Invoice tax&quot;" name="name"/>
            <field eval="0" name="perm_unlink"/>
            <field eval="0" name="perm_write"/>
            <field eval="1" name="perm_create"/>
            <field name="group_id" ref="purchase.group_purchase_manager"/>
        </record>
        
        <!-- Purchase order security -->
        <record id="access_purchase_order" model="ir.model.access">
            <field name="name">Purchase Order</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'purchase.order')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_purchase_order_purchase_manager" model="ir.model.access">
            <field name="name">Purchase Order</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'purchase.order')]"/>
            <field name="group_id" ref="group_purchase_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <!-- Purchase order line security -->
        <record id="access_purchase_order_line" model="ir.model.access">
            <field name="name">Purchase Order Line</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'purchase.order.line')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_purchase_order_line_purchase_manager" model="ir.model.access">
            <field name="name">Purchase Order Line</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'purchase.order.line')]"/>
            <field name="group_id" ref="group_purchase_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
    </data>
</terp>