This commit adds the feature to select a date in the future in order to see future allocations, would it be for accrual plans granting new allocated days, lost days due to expired allocations or allocations that are not yet available to the employee. The date selector only appear when the employee has accrual allocation, in which case the feature is more relevant. This feature comes with a major refactoring of hr_holidays methods to handle some edge cases in the management of leaves. The refactoring also includes the removal of the 'draft' and 'cancel' state in allocations. This commit also removes unused imports and implements some linting fixes. task-2675380 closes odoo/odoo#108148 Related: odoo/upgrade#4238 Related: odoo/enterprise#35157 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
26 lines
1.0 KiB
XML
26 lines
1.0 KiB
XML
<?xml version='1.0' encoding='UTF-8' ?>
|
|
<odoo>
|
|
|
|
<record id="hr_leave_allocation_cron_accrual" model="ir.cron">
|
|
<field name="name">Accrual Time Off: Updates the number of time off</field>
|
|
<field name="model_id" ref="model_hr_leave_allocation"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model._update_accrual()</field>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">days</field>
|
|
<field name="numbercall">-1</field>
|
|
<field name="doall" eval="True"/>
|
|
</record>
|
|
|
|
<record id="hr_leave_cron_cancel_invalid" model="ir.cron">
|
|
<field name="name">Time Off: Cancel invalid leaves</field>
|
|
<field name="model_id" ref="model_hr_leave"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model._cancel_invalid_leaves()</field>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">days</field>
|
|
<field name="numbercall">-1</field>
|
|
<field name="doall" eval="True"/>
|
|
</record>
|
|
</odoo>
|