Skip to Content
Menu
This question has been flagged
2 Replies
8231 Views

Hi, 

I've spent an hour on this topic. I am trying to work out what should be the correct group name in my ir.model.access.csv file.

I have created below two groups to access my custom model.


I created below ir.model.access.csv:


When I upgrade my module, it always complains my group_id column is not right. I read all the pages I found on web but can't work out.

Avatar
Discard
Author

Sehrish, thank you.

Best Answer

Hi,

Seems you are facing issue to find the external id of the groups, for this what you have to do is  that activate the developer mode from the settings and navigate to Settings -> Users & Companies -> Groups, search for the group and open it.

Then click on the debugger button at the top right of the screen, near logged in user name, click on View Meta Data


Then from the next pop up, you can get the external id of this group.


So the group name for the Sales Administrator is: sales_team.group_sale_manager

If the groups are created from the user interface, it will not have external ID, in such cases, you can generate the external id by exporting the record one time.


Reference:

  1. Activate Developer Mode in Odoo

  2. How To Find External ID Of Records in Odoo

     3. How To Generate External ID For The Records Created From User Interface Odoo

     4. How To Set Access Rights For Models in Odoo


Thanks
Avatar
Discard
Author

Thank you.

Best Answer

The relations among ir.rule, ir.model.access.csv and security.xml are depicted in this slides

https://www.slideshare.net/ElnAnnaJnasdttir/odoo-experience-2018-how-to-break-odoo-security-or-how-to-prevent-it

Avatar
Discard
Related Posts Replies Views Activity
2
Aug 24
374
1
May 23
934
1
Nov 15
3985
1
May 19
3799
2
Sep 24
257