user-interfaceodooinvoicedebug-modeodoo-17

how to remove invoiced column in sale orders odoo 17


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


Solution

  • 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