Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
173 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
août 23
3341
3
déc. 21
7158
1
janv. 21
4425
0
déc. 18
2531
7
oct. 18
22314