<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 Tecnativa - Jairo Llopis
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<data>
    <record id="view_partner_form" model="ir.ui.view">
        <field name="name">Add consent smart button</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form" />
        <field name="arch" type="xml">
            <div name="button_box" position="inside">
                <button
                    attrs='{"invisible": [("privacy_consent_count", "=", 0)]}'
                    class="oe_stat_button"
                    context='{"search_default_partner_id": active_id}'
                    groups="privacy.group_data_protection_user"
                    icon="fa-handshake-o"
                    name="%(consent_action)d"
                    type="action"
                >
                    <field name="privacy_consent_count" widget="statinfo" />
                </button>
            </div>
        </field>
    </record>
</data>
