46 lines
2.4 KiB
XML
46 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record model="ir.module.category" id="module_category_purchase_collective_management">
|
|
<field name="name">Collective Purchase</field>
|
|
<field name="description">Make bulk purchases from several users</field>
|
|
<field name="sequence">20</field>
|
|
</record>
|
|
|
|
<record id="group_purchase_collective_user" model="res.groups">
|
|
<field name="name">User</field>
|
|
<field name="implied_ids" eval="[(4, ref('base.group_user')),(4,ref('purchase.group_purchase_user'))]"/>
|
|
<field name="category_id" ref="purchase_collective.module_category_purchase_collective_management"/>
|
|
</record>
|
|
|
|
<record id="group_purchase_collective_manager" model="res.groups">
|
|
<field name="name">Manager</field>
|
|
<field name="category_id" ref="purchase_collective.module_category_purchase_collective_management"/>
|
|
<field name="implied_ids" eval="[(4, ref('group_purchase_collective_user')),(4,ref('purchase.group_purchase_manager'))]"/>
|
|
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
|
</record>
|
|
|
|
<record model="ir.rule" id="purchase_collective_order_all_rule">
|
|
<field name="name">Collective Purchase Order All Read</field>
|
|
<field name="model_id" ref="model_purchase_collective_order"/>
|
|
<field name="global" eval="False"/>
|
|
<field name="groups" eval="[(4,ref('purchase_collective.group_purchase_collective_user'))]"/>
|
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.parent_id.id])]</field>
|
|
<field name="perm_read" eval="True"/>
|
|
<field name="perm_write" eval="False"/>
|
|
<field name="perm_unlink" eval="False"/>
|
|
<field name="perm_create" eval="True"/>
|
|
</record>
|
|
|
|
<record model="ir.rule" id="purchase_order_comp_rule">
|
|
<field name="name">Collective Purchase Order multi-company</field>
|
|
<field name="model_id" ref="model_purchase_collective_order"/>
|
|
<field name="global" eval="False"/>
|
|
<field name="domain_force">['|',('create_uid','=',False),('create_uid','=',user.id)]</field>
|
|
<field name="groups" eval="[(4,ref('purchase_collective.group_purchase_collective_user'))]"/>
|
|
<field name="perm_read" eval="True"/>
|
|
<field name="perm_write" eval="True"/>
|
|
<field name="perm_unlink" eval="False"/>
|
|
<field name="perm_create" eval="True"/>
|
|
</record>
|
|
</odoo>
|