<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 Simone Rubino - Agile Business Group
     Copyright 2018 ForgeFlow S.L.
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
    <record id="view_stock_move_line_operation_tree" model="ir.ui.view">
        <field
            name="name"
        >stock.move.line.operations.tree - stock_picking_filter_lot</field>
        <field name="model">stock.move.line</field>
        <field name="inherit_id" ref="stock.view_stock_move_line_operation_tree" />
        <field name="arch" type="xml">
            <field name="lot_id" position="attributes">
                <attribute
                    name="domain"
                >[('product_id','=', parent.product_id), ('company_id', '=', company_id), ('location_ids', 'child_of', location_id)]</attribute>
            </field>
        </field>
    </record>
    <record id="view_stock_move_line_detailed_operation_tree" model="ir.ui.view">
        <field
            name="name"
        >stock.move.line.detailed.operations.tree - stock_picking_filter_lot</field>
        <field name="model">stock.move.line</field>
        <field
            name="inherit_id"
            ref="stock.view_stock_move_line_detailed_operation_tree"
        />
        <field name="arch" type="xml">
            <field name="lot_id" position="attributes">
                <attribute
                    name="domain"
                >[('product_id','=', product_id), ('company_id', '=', company_id), ('location_ids', 'child_of', location_id)]</attribute>
            </field>
        </field>
    </record>
</odoo>
