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

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
srp 23
3321
3
pro 21
7112
1
led 21
4419
0
pro 18
2509
7
říj 18
22287