我正在尝试为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"/>更多推荐
发布评论