[ADD]hr_negative_leave

This commit is contained in:
2025-10-31 09:42:41 +01:00
parent 4d76c78863
commit 2e392a5afd
12 changed files with 1149 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<odoo>
<record id="hr_leave_view_negative_leave" model="ir.ui.view">
<field name="name">hr.leave.view.negative.leave</field>
<field name="model">hr.leave</field>
<field name="inherit_id" ref="hr_holidays.hr_leave_view_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='holiday_status_id']" position="attributes">
<attribute name="domain">[
'|',
('requires_allocation', '=', 'no'),
'&amp;',
('has_valid_allocation', '=', True),
'|',
('allows_negative', '=', True),
'&amp;',
('virtual_remaining_leaves', '&gt;', 0),
('allows_negative', '=', False),
]</attribute>
</xpath>
</field>
</record>
</odoo>