Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
10611 Zobrazení

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
Zrušit
Autor

Sehrish, thank you.

Nejlepší odpověď

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
Zrušit
Autor

Thank you.

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
srp 24
2054
1
kvě 23
2081
1
lis 15
4986
1
kvě 19
4809
2
zář 24
1430