Files
suite/hr_payroll_timesheet/views/hr_payslip_views.xml

21 lines
915 B
XML

<?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="action_open_timesheets" type="object" icon="fa-history" attrs="{'invisible': [('timesheet_count', '=', 0)]}">
<field string="Timesheets" name="timesheet_count" widget="statinfo"/>
</button>
</xpath>
<xpath expr="//field[@name='number']" position="after">
<field name="timesheet_ids" invisible="1" widget="many2many"/>
</xpath>
</field>
</record>
</odoo>