<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 Tecnativa - Sergio Teruel
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
    <record id="view_picking_form" model="ir.ui.view">
        <field name="inherit_id" ref="stock.view_picking_form" />
        <field name="model">stock.picking</field>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='owner_id']" position="after">
                <field name="is_return" invisible="1" />
                <field
                    name="to_refund_lines"
                    invisible="not is_return"
                    string="Refund Options"
                />
            </xpath>
            <!-- Make visible to_refund field at operations (stock moves) level -->
            <xpath
                expr="//field[@name='move_ids_without_package']/list"
                position="inside"
            >
                <field name="to_refund" column_invisible="not parent.is_return" />
            </xpath>
        </field>
    </record>
</odoo>
