本文介绍了删除或隐藏Odoo中的菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个菜单项,我想隐藏或删除它.
I have this menu item, and I want to hide or remove it.
推荐答案
首先创建一个其中没有用户的虚拟组
First create a dummy group with no users in it
<record id="make_invisible" model="res.groups"> <field name="name">Invisible</field> </record>替换组中的所有用户.此处的eval语句意味着将groups_id字段中的所有ID替换为组make_invisible的ID.
Replace all users in the group. The eval statement here means, replace all ids in the groups_id field with the id for group make_invisible.
<record model="ir.ui.menu" id="module.menu_name"> <field name="groups_id" eval="[(6,0,[ref('make_invisible')])]"/> </record>您可以找到有关评估的工作方式的更多信息此处
You can find more information on how the eval works here
更多推荐
删除或隐藏Odoo中的菜单项
发布评论