跳至內容
選單
此問題已被標幟
3 回覆
1287 瀏覽次數

How to hide custom menu based on debug mode?

頭像
捨棄
最佳答案

add attribute in the menuitem like below

groups="base.group_no_one" 

頭像
捨棄
作者

<menuitem id="menu_asset_depreciation_wizard"
name="Generate Assets Entries"
action="action_asset_depreciation_wizard"
parent="account.menu_finance_entries_generate_entries"
sequence="111"
groups="base.group_no_one"/>
i have added still menu is not hided

作者 最佳答案

i have given..still not working


頭像
捨棄

Many places in odoo use that,
https://github.com/odoo/odoo/blob/16.0/addons/account/views/account_menuitem.xml#L61
Try reset hard cache your browser also

upgrade module and try open another browser tab

Why i have posted the answer first and Mr Malviya get the best answer :( ?

最佳答案

You can add groups="base.group_no_one"

It will works

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
1月 17
3219
4
2月 24
11356
0
11月 23
1370
1
6月 23
1894
2
4月 23
2528