how to remove invoiced column in sale orders odoo 17

62 Views Asked by At

Community any one help me how i removed invoiced column using inherit view through Odoo UI enter image description here

1

There are 1 best solutions below

3
On BEST ANSWER

You can remove the field optional attribute.

Example:

<record id="view_order_form" 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="arch" type="xml">
        <xpath expr="//field[@name='order_line']/tree/field[@name='qty_invoiced']" position="attributes">
            <attribute name="optional"></attribute>
        </xpath>
    </field>
</record>

To do it through the UI, Go to Technical / User Interface / Views and look for sale.order.form then add a line under Inherited Views

  • Set a view name (sale.order.form.inherit)

  • and set the Architecture to:

    <xpath expr="//field[@name='order_line']/tree/field[@name='qty_invoiced']" position="attributes">
        <attribute name="optional"/>
    </xpath>