<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="hr_payslip_view_form_inherit" model="ir.ui.view">
        <field name="name">hr.payslip.view.form.inherit</field>
        <field name="model">hr.payslip</field>
        <field name="inherit_id" ref="hr_payroll.view_hr_payslip_form"/>
        <field name="arch" type="xml">
            <xpath expr="//div[@name='button_box']" position="inside">
                <button class="oe_stat_button" name="open_commissions" type="object" icon="fa-dollar" attrs="{'invisible': [('commission_count', '=', 0)]}">
                    <field string="Commissions" name="commission_count" widget="statinfo"/>
                </button>
            </xpath>
            <xpath expr="//field[@name='number']" position="after">
                <field name="commission_payment_ids" invisible="1"/>
            </xpath>
        </field>
    </record>

</odoo>
