删除或隐藏Odoo中的菜单项 [英] Remove or hide a menu item in Odoo

查看:156
本文介绍了删除或隐藏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中的菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆