<odoo>
    <record id="view_partner_form" model="ir.ui.view">
        <field name="name">view_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">
                <button name="action_view_contract" type="object" class="oe_stat_button" icon="fa-pencil-square-o"
                        context="{'view':'contract_customer_action', 'search_default_open': 1}">
                    <field name="contract_count" widget="statinfo" string="Договоры"/>
                </button>
            </xpath>
            <xpath expr="//field[@name='category_id']" position="after">
                <field name="passport" invisible="is_company==True"/>
            </xpath>
        </field>
    </record>
</odoo>