From 5077bef37c36c1cfbfa9abc3ed8573c78ad05e69 Mon Sep 17 00:00:00 2001 From: Tobias Herre Date: Thu, 20 May 2021 11:41:34 +0200 Subject: [PATCH] Use 0.5 for half-days instead of 0.25. --- itis_hr_leave_extend/models/hr_holiday.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/itis_hr_leave_extend/models/hr_holiday.py b/itis_hr_leave_extend/models/hr_holiday.py index 985a113..63a28f2 100644 --- a/itis_hr_leave_extend/models/hr_holiday.py +++ b/itis_hr_leave_extend/models/hr_holiday.py @@ -291,10 +291,10 @@ class HRHoliday(models.Model): if cont_start_date <= temp_date: if self.get_hours(weekday, contract.working_hours.attendance_ids) > 0.0: if temp_date == date_from and self.leave_selection =='half_day': - res += 0.25 + res += 0.5 break if temp_date == date_to and self.leave_selection_date_to =='half_day': - res += 0.25 + res += 0.5 break res += 1 else: @@ -303,10 +303,10 @@ class HRHoliday(models.Model): if cont_start_date <= temp_date and cont_end_date >= temp_date: if self.get_hours(weekday, contract.working_hours.attendance_ids) > 0.0: if temp_date == date_from and self.leave_selection =='half_day': - res += 0.25 + res += 0.5 break if temp_date == date_to and self.leave_selection_date_to =='half_day': - res += 0.25 + res += 0.5 break res += 1 temp_date += timedelta(days=1)