<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2024 Moduon Team S.L.
     License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) -->
<odoo>
    <record id="view_partner_form_inherit_customer_deposit" model="ir.ui.view">
        <field name="name">Partner Order Customer Deposits</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form" />
        <field name="arch" type="xml">
            <xpath expr="//div[@name='button_box']" position="inside">
                <button
                    name="action_view_customer_deposits"
                    type="object"
                    class="oe_stat_button"
                    icon="fa-cubes"
                    attrs="{'invisible': [('customer_deposit_count', '&lt;=', 0)]}"
                    groups="stock.group_tracking_owner"
                >
                    <field
                        name="customer_deposit_count"
                        widget="statinfo"
                        string="Deposits"
                    />
                </button>
            </xpath>
        </field>
    </record>

</odoo>
