Odoo:如何在销售订单中删除笔记本页面

时间:2019-12-20 00:52:55

标签: odoo odoo-12

如何在销售订单中删除或修改这些笔记本页面,我在addons / sale / views / sale_views.xml中搜索了它们,但找不到它们

enter image description here

2 个答案:

答案 0 :(得分:2)

您不应该从表单视图中删除页面,因为它也是从其他视图继承的。

相反,您可以通过继承销售invisible使其view_order_form

       <record id="view_order_form_inherit" model="ir.ui.view">
            <field name="name">sale.order.form</field>
            <field name="model">sale.order</field>
            <field name="inherit_id" ref="sale.view_order_form"/>
            <field name="priority">20</field>
            <field name="arch" type="xml">
                <xpath expr="//page[@name='other_information']" position="attributes">
                    <attribute name="invisible">1</attribute>
                </xpath>
                <xpath expr="//page[2]" position="attributes">
                    <attribute name="invisible">1</attribute>
                </xpath>
            </field>
        </record>

希望这会有所帮助!

答案 1 :(得分:0)

        <!--remove the notebook pages-->

        <xpath expr="//page[@name='extra']" position="attributes">
                <attribute name="invisible">1</attribute>
        </xpath>
        
        <xpath expr="//page[@name='note']" position="attributes">
                <attribute name="invisible">1</attribute>
        </xpath>  
相关问题