[FIX] hr_holidays: fix action_with_unused_accruals visual
Fixes the above mentioned field in the hierarchical kanban view in the accrual plan form view. TaskId-2637152 closes odoo/odoo#75923 Related: odoo/upgrade#2802 Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -20,7 +20,7 @@ def _get_date_check_month(year, month, day):
|
||||
"""
|
||||
month_range = calendar.monthrange(year, month)
|
||||
if day > month_range[1]:
|
||||
return datetime.date(year, month, min(day, month_range[1])) + relativedelta(days=(day - month_range[1]))
|
||||
return datetime.date(year, month, month_range[1]) + relativedelta(days=(day - month_range[1]))
|
||||
return datetime.date(year, month, day)
|
||||
|
||||
class AccrualPlanLevel(models.Model):
|
||||
|
||||
@@ -160,8 +160,8 @@
|
||||
<div t-if="record.maximum_leave.value">
|
||||
Limit of <field name="maximum_leave"/> <field name="start_type"/>
|
||||
</div>
|
||||
<div t-if="record.action_with_unused_accruals.value">
|
||||
At the end of the year, unused accruals will be <t t-if="record.action_with_unused_accruals.value == 'postponed'">postponed</t><t t-else="">lost</t>
|
||||
<div t-if="record.action_with_unused_accruals.raw_value">
|
||||
At the end of the year, unused accruals will be <t t-if="record.action_with_unused_accruals.raw_value == 'postponed'">postponed</t><t t-else="">lost</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user