<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="view_partner_form" model="ir.ui.view">
        <field name="name">res.partner.form</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">
                <field name="commercial_partner_id" invisible="1" />
                <button
                    class="oe_stat_button"
                    name="%(sale_primeship_action)d"
                    type="action"
                    groups="sales_team.group_sale_manager"
                    icon="fa-id-card"
                    context="{'search_default_partner_id': commercial_partner_id, 'default_partner_id': commercial_partner_id}"
                >
                    <div class="o_form_field o_stat_info">
                        <div class="o_row">
                            <span class="o_stat_value">
                                <field
                                    string="Primeships"
                                    name="primeship_count"
                                    widget="integer"
                                />
                            </span>
                        </div>
                        <span class="o_stat_text">Primeships</span>
                    </div>
                </button>
            </xpath>
            <xpath expr="//field[@name='vat']" position="after">
                <field name="active_primeship" />
            </xpath>
        </field>
    </record>
</odoo>
