隐藏OpenERP中的侧边栏按钮(Hide sidebar button in OpenERP)

编程入门 行业动态 更新时间:2024-10-23 01:37:27
隐藏OpenERP中的侧边栏按钮(Hide sidebar button in OpenERP)

我正在尝试为OpenERP 6.1编写一个模块,该模块将隐藏Partner表单上的“Send a SMS”按钮。 我尝试使用不同的name和src_model覆盖窗口操作的id,但只显示了名称更改。 我遍历了代码,看起来基础模块的ir_values记录仍然将动作链接到res.partner模型。

是否有合法的方法来隐藏侧边栏按钮,或者我将不得不修改基本模块? 我简单地尝试限制向导表的权限,但这似乎没有效果。

I'm trying to write a module for OpenERP 6.1 that will hide the "Send an SMS" button on the Partner form. I tried overwriting the window action's id with a different name and src_model, but only the name change appeared. I traced through the code, and it looks like the ir_values records from the base module are still linking the action to the res.partner model.

Is there a legitimate way to hide a sidebar button, or am I going to have to modify the base module? I briefly tried restricting permissions on the wizard's table, but that didn't seem to have an effect.

最满意答案

只需尝试<delete>标记 ,它适用于XML和YAML。 您可以按XML标识删除特定记录,也可以使用搜索条件。

<delete model="ir.actions.act_window" id="other_module.action_id"/>

Just try the <delete> tag, it works for XML as well as YAML. You can delete a specific record by its XML id, or use search criteria.

<delete model="ir.actions.act_window" id="other_module.action_id"/>

更多推荐

本文发布于:2023-08-07 12:13:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464248.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:侧边   按钮   OpenERP   button   sidebar

发布评论

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

>www.elefans.com

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