<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2020 ACSONE SA/NV
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>

    <record model="ir.ui.view" id="stock_production_lot_form_view">
        <field name="model">stock.lot</field>
        <field name="inherit_id" ref="stock.view_production_lot_form" />
        <field name="arch" type="xml">
            <field name="display_complete" position="before">
                <widget
                    name="web_ribbon"
                    title="Archived"
                    bg_color="bg-danger"
                    attrs="{'invisible': [('active', '=', True)]}"
                />
                <field name="active" invisible="1" />
            </field>
        </field>
    </record>

    <record model="ir.ui.view" id="stock_production_lot_tree_view">
        <field name="model">stock.lot</field>
        <field name="inherit_id" ref="stock.view_production_lot_tree" />
        <field name="arch" type="xml">
            <field name="company_id" position="after">
                <field name="active" invisible="1" />
            </field>
        </field>
    </record>

    <record model="ir.ui.view" id="stock_production_lot_search_view">
        <field name="model">stock.lot</field>
        <field name="inherit_id" ref="stock.search_product_lot_filter" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <filter
                    name="archived"
                    string="Archived"
                    domain="[('active', '=', False)]"
                />
            </field>
        </field>
    </record>

</odoo>
