Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
10585 Widoki

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.

Awatar
Odrzuć
Autor

Sehrish, thank you.

Najlepsza odpowiedź

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
Awatar
Odrzuć
Autor

Thank you.

Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
sie 24
2036
1
maj 23
2076
1
lis 15
4974
1
maj 19
4808
2
wrz 24
1425