<?xml version="1.0" encoding="utf-8"?>
<odoo>
        <record id="view_order_batch_product_form" model="ir.ui.view">
                <field name="name">sale.order.batch.product.form.nfu</field>
                <field name="model">sale.order.batch.product</field>
                <field name="inherit_id" ref="sale_order_batch.view_order_batch_product_form"/>
                <field name="arch" type="xml">
                    <xpath expr="//group[@name='product_info']" position="inside">
                        <field name="product_uom_max_qty"/>
                        <field
                    name="open_packaging_qty"
                    decoration-warning="open_packaging_qty != 0.0 and open_packaging_max_qty == 0.0"
                    decoration-danger="open_packaging_max_qty != 0.0"
                />
                        <field name="open_packaging_max_qty" decoration-danger="(open_packaging_max_qty != 0.0)"/>
                        <field name="open_packaging_state"/>
                    </xpath>
                    <xpath expr="//header" position="inside">
                        <field name="has_qty_adjusted" invisible="1"/>
                        <button
                    name="action_restore_ordered_qty"
                    type="object"
                    string="Restore Ordered Qty"
                    attrs="{'invisible': [('has_qty_adjusted', '=', False)]}"
                />
                    </xpath>
                    <xpath
                expr="//field[@name='sale_order_line_ids']/tree/field[@name='product_uom_qty']"
                position="before"
            >
                            <field name="product_uom_ordered_qty" optional="hide"/>
                    </xpath>
                    <xpath
                expr="//field[@name='sale_order_line_ids']/tree/field[@name='product_uom_qty']"
                position="after"
            >
                            <field name="product_uom_max_qty"/>
                    </xpath>
                </field>
        </record>
 </odoo>
