<?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', []))]"/>
                            <label for="scrap_qty"/>
                            <div class="o_row">
                                <field name="scrap_qty" attrs="{'readonly': [('tracking', '=', 'serial')]}"/>
                                <field name="product_uom_category_id" invisible="1"/>
                                <field name="product_uom_id" groups="uom.group_uom"/>
                            </div>
                        </group>
                        <group>
                            <field name="picking_id" invisible="1"/>
                            <field name="tracking" invisible="1"/>
                            <field name="lot_id" groups="stock.group_production_lot" context="{'default_company_id': company_id, 'default_product_id': product_id}" attrs="{'invisible': ['|',('product_id', '=', False),('tracking', '=', 'none')], 'required': [('tracking', '!=', 'none')]}"/>
                            <field name="package_id" groups="stock.group_tracking_lot"/>
                            <field name="owner_id" groups="stock.group_tracking_owner"/>
                            <field name="company_id" invisible="1"/>
                            <field name="location_id" groups="stock.group_stock_multi_locations" options="{'no_open': True, 'no_create': True}"/>
                            <field name="scrap_location_id" groups="stock.group_stock_multi_locations" options="{'no_open': True, 'no_create': True}"/>
                        </group>
                    </group>
                    <footer>
                        <button name="action_validate" string="Done" type="object" class="btn-primary" data-hotkey="q"/>
                        <button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z"/>
                    </footer>
                </form>
            