<?xml version="1.0"?>
<odoo>
    <record id="event_registration_view_form" model="ir.ui.view">
        <field name="name">event.registration.form.inherit.event.crm</field>
        <field name="model">event.registration</field>
        <field name="inherit_id" ref="event.view_event_registration_form"/>
        <field name="arch" type="xml">
            <xpath expr="//div[@name='button_box']" position="inside">
                <button name="%(crm_lead_action_from_registration)d" class="oe_stat_button" type="action" icon="fa-star"
                    invisible="lead_count == 0" groups="sales_team.group_sale_salesman">
                    <div class="o_stat_info">
                        <field name="lead_count"/>
                        <span class="o_stat_text"> Leads</span>
                    </div>
                </button>
            </xpath>
        </field>
    </record>
</odoo>
