[FIX] hr_holidays : no traceback on accrual plan with no level
How to reproduce : -Create accrual plan with no level Current Behaviour : Traceback because num2words does not support all of odoo language For supported language, the numbers showed are not ordinal Behaviour After PR: Show Basic numbers in every case opw-2697987 closes odoo/odoo#80849 X-original-commit: 0cf2ade4e6e959170906b4b0143e07909980b1d7 Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -39,7 +39,7 @@ class AccrualPlan(models.Model):
|
||||
)
|
||||
mapped_count = {group['accrual_plan_id'][0]: group['accrual_plan_id_count'] for group in level_read_group}
|
||||
for plan in self:
|
||||
plan.level_count = mapped_count[plan.id]
|
||||
plan.level_count = mapped_count.get(plan.id, 0)
|
||||
|
||||
@api.depends('allocation_ids')
|
||||
def _compute_employee_count(self):
|
||||
|
||||
Reference in New Issue
Block a user