如何删除odoo14中所有模型的看板视图?

问题描述

我需要删除所有模型中的看板视图,例如销售、购买等。我尝试继承看板视图并替换为空。显示继承 xpath 错误

任何帮助都是可观的!

解决方法

请尝试继承操作,例如: 之前:

<record id="action_orders" model="ir.actions.act_window">
    <field name="name">Sales Orders</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">sale.order</field>
    <field name="view_type">form</field>
    <field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity</field>
    <field name="search_view_id" ref="sale_order_view_search_inherit_sale"/>
    <field name="context">{}</field>
    <field name="domain">[('state','not in',('draft','sent','cancel'))]</field>
    <field name="help" type="html">
        <p class="o_view_nocontent_smiling_face">
            Create a new quotation,the first step of a new sale!
        </p><p>
            Once the quotation is confirmed,it becomes a sales order.<br/> You will be able to create an invoice and collect the payment.
        </p>
    </field>
</record>

使用继承,您可以编辑任何要实现的内容:

<record id="sale.action_orders" model="ir.actions.act_window">
    <field name="name">Sales Orders</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">sale.order</field>
    <field name="view_type">form</field>
    <field name="view_mode">tree,it becomes a sales order.<br/> You will be able to create an invoice and collect the payment.
        </p>
    </field>
</record>

此外,我不确定字段视图获取是否也可以,但您可以尝试一下。