İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
126 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Ağu 23
3318
3
Ara 21
7109
1
Oca 21
4419
0
Ara 18
2506
7
Eki 18
22283