I need to remove the create button in kanban view which found in "Sales/Customers" as in below image
答案 0 :(得分:1)
在您的看板声明中添加create="false"
,就像您在下面看到的那样。
<kanban create="false">
您可以直接进入设置 - >用户界面 - &gt;视图并对其进行编辑。您也可以通过单击用户名(在屏幕v8的右上角或小问号v9 +)激活开发人员模式,然后选择About Odoo
然后激活开发人员模式。从那里你还应该能够编辑表单视图(如果你有管理权限)。
您还可以创建一个使用xpath修改此视图的插件。与此类似。
<record model="ir.ui.view" id="modified_partner_form_view">
<field name="name">partner.modified</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//kanban" position="attributes">
<attribute name="create">false</attribute>
</xpath>
</field>
</record>
注意:将create设置为false应该可行但是使用webconsole不允许我将属性添加到看板标记。我不知道为什么,它应该工作,但在我的安装不会。 xpath方法应该可以工作,我已经用它来修改其他属性但是没有使用这个看板创建属性进行测试。如果有人知道为什么这可能不起作用请评论。感谢