<?xml version="1.0"?>
<form string="Scrap">
                    <group>
                        <group>
                            <field name="state" invisible="1"/>
                            <field name="product_id" options="{'no_create': True}" domain="[('id', 'in', context.get('product_ids', []))]" readonly="state == 'done'"/>
                            <field name="tracking" invisible="1"/>
                            <label for="scrap_qty"/>
                            <div class="o_row">
                                <field name="scrap_qty" readonly="tracking == 'serial'"/>
                                <field name="product_uom_category_id" invisible="1"/>
                                <field name="product_uom_id" readonly="tracking == 'serial'" groups="uom.group_uom"/>
                            </div>
                            <field name="lot_id" groups="stock.group_production_lot" context="{'default_product_id': product_id}" invisible="not product_id or tracking == 'none'" readonly="state == 'done'" required="tracking != 'none'"/>
                            <field name="scrap_reason_tag_ids" widget="many2many_tags" options="{'no_create_edit': True}"/>
                        </group>
                        <group>
                            <field name="picking_id" invisible="1" readonly="state == 'done'"/>
                            <field name="package_id" groups="stock.group_tracking_lot" readonly="state == 'done'"/>
                            <field name="owner_id" groups="stock.group_tracking_owner" readonly="state == 'done'"/>
                            <field name="company_id" invisible="1" readonly="state == 'done'"/>
                            <field name="location_id" groups="stock.group_stock_multi_locations" options="{'no_open': True, 'no_create': True}" readonly="state == 'done'"/>
                            <field name="scrap_location_id" groups="stock.group_stock_multi_locations" options="{'no_open': True, 'no_create': True}" readonly="state == 'done'"/>
                            <field name="should_replenish" readonly="state == 'done'"/>
                        </group>
                    </group>
                    <footer>
                        <button name="action_validate" string="Scrap Products" type="object" class="btn-primary" data-hotkey="q"/>
                        <button string="Discard" class="btn-secondary" special="cancel" data-hotkey="x"/>
                    </footer>
                </form>
            