<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record model="ir.ui.view" id="view_picking_form">
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock.view_picking_form" />
        <field name="arch" type="xml">
            <field name="user_id" position="after">
                <field
                    name="batch_id"
                    domain="[
                            ('state', 'in', ['draft', 'in_progress']),
                            '|',
                                ('picking_type_id', '=', picking_type_id),
                                ('picking_type_id', '=', False),
                        ]"
                    context="{'default_picking_type_id': picking_type_id}"
                />
            </field>

        </field>
    </record>
</odoo>
