删除或隐藏Odoo中的菜单项

编程入门 行业动态 更新时间:2024-10-28 12:17:42
本文介绍了删除或隐藏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中的菜单项

本文发布于:2023-11-16 19:32:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1607165.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单项   中的菜   Odoo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!