From ee9b64a42837db28190403dd8a7f0231a3a4b71b Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Wed, 13 Jul 2016 11:12:00 +0200 Subject: [PATCH] [FIX] hr_holiday: correct call to get_working_hours + typo --- addons/hr_holidays/models/hr_holidays.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/hr_holidays/models/hr_holidays.py b/addons/hr_holidays/models/hr_holidays.py index 72cbd3e24c1..d2aa657de4e 100644 --- a/addons/hr_holidays/models/hr_holidays.py +++ b/addons/hr_holidays/models/hr_holidays.py @@ -163,10 +163,10 @@ class Holidays(models.Model): ('validate1', 'Second Approval'), ('validate', 'Approved') ], string='Status', readonly=True, track_visibility='onchange', copy=False, default='confirm', - help="The status is set to 'To Submit', when a holiday request is created.\ - \nThe status is 'To Approve', when holiday request is confirmed by user.\ - \nThe status is 'Refused', when holiday request is refused by manager.\ - \nThe status is 'Approved', when holiday request is approved by manager.") + help="The status is set to 'To Submit', when a holiday request is created." + + "\nThe status is 'To Approve', when holiday request is confirmed by user." + + "\nThe status is 'Refused', when holiday request is refused by manager." + + "\nThe status is 'Approved', when holiday request is approved by manager.") payslip_status = fields.Boolean('Reported in last payslips', help='Green this button when the leave has been taken into account in the payslip.') report_note = fields.Text('HR Comments') @@ -284,7 +284,7 @@ class Holidays(models.Model): uom_hour = resource.calendar_id.uom_id uom_day = self.env.ref('product.product_uom_day') if uom_hour and uom_day: - return self.env['product.uom']._compute_qty_obj(uom_hour, hours[0], uom_day) + return self.env['product.uom']._compute_qty_obj(uom_hour, hours, uom_day) time_delta = to_dt - from_dt return math.ceil(time_delta.days + float(time_delta.seconds) / 86400)