<?xml version="1.0"?>
<form string="Operation Types">
                <sheet>
                    <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
                    <label for="name"/>
                    <h1><field name="name" placeholder="e.g. Receptions"/></h1>
                    <group name="first">
                        <group>
                            <field name="code"/>
                            <field name="active" invisible="1"/>
                            <field name="company_id" invisible="1"/>
                            <field name="hide_reservation_method" invisible="1"/>
                            <field name="sequence_id" groups="base.group_no_one"/>
                            <field name="sequence_code"/>
                            <field name="warehouse_id" groups="stock.group_stock_multi_warehouses" force_save="1"/>
                            <field name="reservation_method" attrs="{'invisible': [('hide_reservation_method', '=', True)]}" widget="radio"/>
                            <field name="auto_show_reception_report" attrs="{'invisible': [('code', 'not in', ['incoming', 'internal'])]}" groups="stock.group_reception_report"/>
                            <label for="reservation_days_before" string="Reserve before scheduled date" attrs="{'invisible': ['|', ('code', '=', 'incoming'), ('reservation_method', '!=', 'by_date')]}"/>
                            <div class="o_row" attrs="{'invisible': ['|', ('code', '=', 'incoming'), ('reservation_method', '!=', 'by_date')]}">
                                <span><field name="reservation_days_before" style="width: 23px;"/> days before/</span>
                                <span><field name="reservation_days_before_priority" style="width: 23px;"/> days before when starred</span>
                            </div>
                        </group>
                        <group>
                            <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
                            <field attrs="{&quot;invisible&quot;: [(&quot;code&quot;, &quot;not in&quot;, [&quot;incoming&quot;, &quot;outgoing&quot;, &quot;internal&quot;])]}" name="return_picking_type_id" string="Returns Type"/>
                            <field name="create_backorder"/>
                            <field name="show_operations"/>
                            <field name="show_reserved" attrs="{'invisible': [('code', '!=', 'incoming')]}"/>
                        </group>
                    </group>
                    <group name="second">
                        <group attrs="{&quot;invisible&quot;: [(&quot;code&quot;, &quot;not in&quot;, [&quot;incoming&quot;, &quot;outgoing&quot;, &quot;internal&quot;])]}" string="Lots/Serial Numbers" groups="stock.group_production_lot" name="stock_picking_type_lot">
                            <field name="use_create_lots" string="Create New"/>
                            <field name="use_existing_lots" string="Use Existing ones"/>
                        </group>
                        <group attrs="{&quot;invisible&quot;: [(&quot;code&quot;, &quot;not in&quot;, [&quot;incoming&quot;, &quot;outgoing&quot;, &quot;internal&quot;])]}" string="Packages" groups="stock.group_tracking_lot">
                            <field name="show_entire_packs"/>
                        </group>
                        <!-- As this group will be hidden without multi_loccation, you will not be able to create a
                            picking type with the code 'Internal', which make sense, but as the field 'code' on picking
                            types can't be partially hidden, you can still select the code internal in the form view -->
                        <group string="Locations" groups="stock.group_stock_multi_locations" name="locations">
                            <field name="default_location_src_id" options="{'no_create': True}" attrs="{'required': [('code', 'in', ('internal', 'outgoing'))]}"/>
                            <field name="default_location_dest_id" options="{'no_create': True}" attrs="{'required': [('code', 'in', ('internal', 'incoming'))]}"/>
                        </group>
                    </group>
                </sheet>
            </form>
        