<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record model="ir.ui.view" id="view_picking_form">
        <field name="name">stock.picking.form</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock.view_picking_form" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='backorder_id']" position="after">
                <field name="require_wa" invisible="1" />
                <field name="purchase_id" invisible="1" />
                <field
                    name="wa_id"
                    options="{'no_create': True}"
                    groups="purchase_work_acceptance.group_enable_wa_on_in"
                    attrs="{'required': [('require_wa','=', True)],
                               'readonly':[('state', 'in' , ('done', 'cancel'))],
                               'invisible': ['|', ('id', '=', False), ('picking_type_code', '!=', 'incoming')]}"
                />
                <field name="wa_ids" invisible="1" />
            </xpath>
        </field>
    </record>
</odoo>
