[FIX] hr_payroll: Specify a worked day description for global leaves

Currently when recording global leaves on the ressource calendar
the worked line has no code or description, which are required.

Specify a default value to allow the saving of the payslip.

closes odoo/odoo#29655
This commit is contained in:
Yannick Tivisse
2018-12-19 16:13:13 +00:00
parent 772b854fcc
commit a6f02af1ab
+2 -2
View File
@@ -180,9 +180,9 @@ class HrPayslip(models.Model):
for interval in day_intervals:
holiday = interval[2]['leaves'].holiday_id
current_leave_struct = leaves.setdefault(holiday.holiday_status_id, {
'name': holiday.holiday_status_id.name,
'name': holiday.holiday_status_id.name or _('Global Leaves'),
'sequence': 5,
'code': holiday.holiday_status_id.name,
'code': holiday.holiday_status_id.name or 'GLOBAL',
'number_of_days': 0.0,
'number_of_hours': 0.0,
'contract_id': contract.id,