<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="view_stock_quant_tree" model="ir.ui.view">
        <field name="model">stock.quant</field>
        <field name="inherit_id" ref="stock.view_stock_quant_tree" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="vlm_quant_ids" invisible="1" />
                <button
                    name="action_view_in_vlm_structure"
                    string="View in VLM"
                    type="object"
                    class="o_replenish_buttons"
                    icon="fa-table"
                    attrs="{'invisible': [('vlm_quant_ids', '=', [])]}"
                />
            </field>
        </field>
    </record>
    <record id="view_stock_quant_tree_editable" model="ir.ui.view">
        <field name="model">stock.quant</field>
        <field name="inherit_id" ref="stock.view_stock_quant_tree_editable" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="vlm_quant_ids" invisible="1" />
                <button
                    name="action_view_in_vlm_structure"
                    string="View in VLM"
                    type="object"
                    class="o_replenish_buttons"
                    icon="fa-table"
                    attrs="{'invisible': [('vlm_quant_ids', '=', [])]}"
                />
            </field>
        </field>
    </record>
    <record id="view_stock_quant_tree_inventory_editable" model="ir.ui.view">
        <field name="model">stock.quant</field>
        <field name="inherit_id" ref="stock.view_stock_quant_tree_inventory_editable" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="vlm_quant_ids" invisible="1" />
                <button
                    name="action_view_in_vlm_structure"
                    string="View in VLM"
                    type="object"
                    class="o_replenish_buttons"
                    icon="fa-table"
                    attrs="{'invisible': [('vlm_quant_ids', '=', [])]}"
                />
            </field>
        </field>
    </record>
</odoo>
