0

I am working on odoo 15. I would like to set access rights to all apps installed for particular group; In my case ; I want to put internal user can read only for any apps installed .. I create a custom module with following : custom_module>security>ir.model.access.csv

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink

I know I should list all models, with its group & access rights but what I can do if I would like to access all current apps installed and featured once ? to give it access rights for particular group ..

user1261494
  • 139
  • 1
  • 10

1 Answers1

1

First you have to create that new user group if its a new one:

<record id="office_technology_group" model="res.groups">
    <field name="name">Office technology</field>
    <field name="comment">Office Technology Permission Group.</field>
    <field name="category_id" ref="ng_office_technology.module_category_ng_office_technology"/>
</record>
<record model="ir.module.category" id="module_category_ng_office_technology">
        <field name="name">Office Technology</field>
        <field name="description">The Office technology Applilcation</field>
        <field name="sequence">20</field>
</record>

Ref: Creating New Groups in Odoo

Then ypu have to write on that security CSV like that:

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink    
model_name_office_technology_group,model_name_office_technology_group,module_name.model_model_name,module_name.office_technology_group,1,1,1,1

Real example:

  • Model: res_partner
  • Base model: Base
  • Custom module (Where you create user groups etc.): custom_module res_partner_office_technology_group,res_partner_office_technology_group,base.model_res_partner,custom_module.office_technology_group,1,1,1,1

Finally you have to add file on manifest.py

https://www.odoo.com/documentation/15.0/es/developer/reference/backend/module.html