Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
127 Prikazi

I am using odoo 18.0, and I found that if I set one groups like some_admin_right in certain menuitem, then add another one like base.group_no_one into it and remove the some_admin_right. 

The new rights of the menu did not work after updating the module, cause the some_admin_right record in the tech -> menu did not be deleted.

So I have to handle the record, instead of auto update after updating the module.

How to make it be auto updated?

Thanks.

Avatar
Opusti
Best Answer

Hi,



You can solve directly from the UI without touching XML. You just need to go to Settings → Technical → User Interface → Menu Items, search for your menu, open it, and under the Groups field, remove the unwanted group (e.g. some_admin_right) and add only the group you want (e.g. base.group_no_one). Once saved, the menu will immediately reflect the new access rights, and you won’t need to manually adjust it again after module updates.



You can add or remove the user groups from here.


Or try with the following code


<menuitem id="my_menu"

          name="My Menu"

          parent="base.menu_custom"

          action="action_my_model"

          groups="base.group_no_one"/>


Hope it helps

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
avg. 23
3318
3
dec. 21
7109
1
jan. 21
4419
0
dec. 18
2506
7
okt. 18
22283