<?xml version="1.0"?>
<odoo>
    <!--Add fields for showing the available quantities in the sale order line-->
    <record id="view_order_form" model="ir.ui.view">
        <field name="name">sale.order.view.form.inherit.sale.stock.restrict
        </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='product_uom_qty']"
                   position="after">
                <field name="available_qty" force_save="1"/>
            </xpath>
            <xpath expr="//field[@name='payment_term_id']" position="after">
                <field name="onhand_check" invisible="1"/>
                <field name="forecast_check" invisible="1"/>
            </xpath>
        </field>
    </record>
</odoo>