Skip to content

Commit

Permalink
fixup! [ADD] verdigado#57 allow higher value overtime for holidays
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed Jan 22, 2024
1 parent 609a146 commit 629cf13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions verdigado_attendance/models/hr_attendance.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def _update_overtime(self, employee_attendance_dates=None):
result = super()._update_overtime(
employee_attendance_dates=employee_attendance_dates
)
if not self.exists():
return result
if employee_attendance_dates is None:
employee_attendance_dates = self._get_attendances_dates()

Expand Down
3 changes: 3 additions & 0 deletions verdigado_attendance/tests/test_overtime_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ def test_calculation_employeeA(self):
attendance.check_out += timedelta(hours=1)
self.assertOvertime(employeeA, "2023-08-06", 34 * 60, 0)
self.assertOvertime(employeeA, "2023-08-06", 1.5 * 34 * 60, 0, adjustment=True)
attendance.unlink()
self.assertOvertime(employeeA, "2023-08-06", 0, 0)
self.assertOvertime(employeeA, "2023-08-06", 0, 0, adjustment=True)

def to_time(self, time_string):
if isinstance(time_string, str):
Expand Down

0 comments on commit 629cf13

Please sign in to comment.