Hi Odooers !
I'd like to know how I can either modify an existing security group or add a new one to an existing module ? In my case I need to have a security group to only allow read access to purchase orders and purchase orders lines (Purchase module). I'd like to do that through a new module that will extend the existing purchase module. I tried to add the following xml to my module's security xml:
<record id="group_purchase_user" model="res.groups">
<field name="name">Consulter</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="category_id" ref="base.module_category_purchase_management"/>
</record>
With the following rules:
access_purchase_order_readonly,access_purchase_order_readonly,purchase.model_purchase_order,group_purchase_user,1,0,0,0
access_purchase_order_line_readonly,access_purchase_order_line_readonly,purchase.model_purchase_order_line,group_purchase_user,1,0,0,0
Thinking I could override the existing "User" security group of Purchase.
I also tried to add a new security group with new security rules in the same fashion:
<record id="group_consult_internal_purchase" model="res.groups">
<field name="name">Consulter</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="category_id" ref="base.module_category_purchase_management"/>
</record>
access_purchase_order_readonly,access_purchase_order_readonly,purchase.model_purchase_order, group_consult_internal_purchase,1,0,0,0
access_purchase_order_line_readonly,access_purchase_order_line_readonly,purchase.model_purchase_order_line, group_consult_internal_purchase,1,0,0,0
I tried to find examples in the documentation or the internet but I couldn't find any so I'm even sure that's possible.
Help please ?