コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
180 ビュー

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.

アバター
破棄
最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
2
8月 23
3343
3
12月 21
7172
1
1月 21
4427
0
12月 18
2538
7
10月 18
22324