wip purchase_collective.

ToDo: Plantillas de correo, crear picking por supplier
This commit is contained in:
santiky 2022-03-24 09:02:45 +01:00
parent d2ac963ee1
commit 4abeea64a5
Signed by: snt
GPG key ID: A9FD34930EADBE71
13 changed files with 836 additions and 0 deletions

View file

@ -0,0 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_purchase_collective_order_public,purchase_collective.order,model_purchase_collective_order,base.group_public,1,0,0,0
access_purchase_collective_order,purchase_collective.order,model_purchase_collective_order,group_purchase_collective_user,1,0,1,0
access_purchase_collective_order_manager,purchase_collective.order,model_purchase_collective_order,group_purchase_collective_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_purchase_collective_order_public purchase_collective.order model_purchase_collective_order base.group_public 1 0 0 0
3 access_purchase_collective_order purchase_collective.order model_purchase_collective_order group_purchase_collective_user 1 0 1 0
4 access_purchase_collective_order_manager purchase_collective.order model_purchase_collective_order group_purchase_collective_manager 1 1 1 1

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<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>
</data>
</openerp>