From f20145d06ae03087ac876b44372ec1a17c110b07 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 11 Jun 2015 09:49:27 +0200 Subject: [PATCH] Upport fix to 8.0 --- hr_holidays_usability/hr_holidays.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hr_holidays_usability/hr_holidays.py b/hr_holidays_usability/hr_holidays.py index 8fe1fd6..3bec144 100644 --- a/hr_holidays_usability/hr_holidays.py +++ b/hr_holidays_usability/hr_holidays.py @@ -227,7 +227,11 @@ class HrHolidays(models.Model): def vacation_from(self): hour = 0 # = morning if self.vacation_time_from and self.vacation_time_from == 'noon': - hour = 12 # noon, LOCAL TIME + hour = 13 # noon, LOCAL TIME + # Warning : when the vacation STARTs at Noon, it starts at 1 p.m. + # to avoid an overlap (which would be blocked by a constraint of + # hr_holidays) if a user requests 2 half-days with different + # holiday types on the same day datetime_str = False if self.vacation_date_from: date_dt = fields.Date.from_string(self.vacation_date_from) @@ -246,7 +250,11 @@ class HrHolidays(models.Model): def vacation_to(self): hour = 23 # = evening if self.vacation_time_to and self.vacation_time_to == 'noon': - hour = 14 # Noon, LOCAL TIME + hour = 12 # Noon, LOCAL TIME + # Warning : when vacation STOPs at Noon, it stops at 12 a.m. + # to avoid an overlap (which would be blocked by a constraint of + # hr_holidays) if a user requests 2 half-days with different + # holiday types on the same day datetime_str = False if self.vacation_date_to: date_dt = fields.Date.from_string(self.vacation_date_to)