<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
     Copyright 2023 Tecnativa - Pedro M. Baeza
     Copyright 2024 ACSONE SA/NV
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
    <record id="view_stock_return_picking_form" model="ir.ui.view">
        <field name="model">stock.return.picking</field>
        <field name="inherit_id" ref="stock.view_stock_return_picking_form" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='product_id']" position="after">
                <field name="lots_visible" invisible="1" />
                <field
                    name="lot_id"
                    groups="stock.group_production_lot"
                    attrs="{'invisible': [('lots_visible', '=', False)]}"
                />
            </xpath>
        </field>
    </record>
</odoo>
