Hello,
Im trying to create the Access right to custom model using the dropdown style via group definition.
I define two groups with custom access right in ir.model.access.csv :
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_model_a,access_model_a,model_a,group_manager,1,1,1,1
access_model_b,access_model_b,model_dieu_b,group_manager,1,1,1,1
access_model_c,access_model_c,model_c,group_manager,1,1,1,1
remote_model_a,Remote model a,model_a,group_user,1,0,0,0
remote_model_b,Remote model b,model_b,group_user,1,0,0,0
remote_model_c,Remote model c,model_c,group_user,1,0,0,0
My security.xml in the Security folder like this:
<odoo>
<record model="ir.module.category" id="model_category">
<field name="name">Test Security</field>
<field name="description">Test access right to custom model</field>
<field name="sequence">81</field>
</record>
<record id="group_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="model_category"/>
</record>
<record id="group_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="model_category"/>
<field name="implied_ids" eval="[(4, ref('group_manager'))]"/>
</record>
</odoo>
So, for using the dropdown style of access right to the custom model, need to add the field:
<field name="implied_ids" eval="[(4, ref('group_manager'))]"/>
When adding the user name to 'group_user' via choosing 'User' in the dropdown style. It will add the user name in group_user.
But it also adds the user name to 'group_manager' too and applies the access right rule of group_manager for the user, instead of using the access right rule of group_user.
That is my issue. So how to solve it by using the dropdown style?
Please help!
Thank you!