Help

0

Struggling with ir.model.access.csv

Avatar
Ying

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.

2 Comments
Avatar
Discard
Avatar
Sehrish
-
Avatar
Ying
-

Sehrish, thank you.

1 Answer
1
Avatar
Niyas Raphy
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
1 Comment
Avatar
Discard
Avatar
Ying
-

Thank you.