Skip to content

Commit

Permalink
Merge pull request #89 from hbrunn/15.0-88-fix-multiday-attendance
Browse files Browse the repository at this point in the history
[ADD] fix for #88, tests for consistency
  • Loading branch information
albig authored Jan 3, 2024
2 parents 7c70e82 + 1061530 commit 16095a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ hr:
hr-attendance:
remotes:
oca: https://github.com/OCA/hr-attendance.git
hbrunn: https://github.com/hbrunn/hr-attendance.git
merges:
- oca 15.0
# https://github.com/OCA/hr-attendance/pull/140
- oca refs/pull/140/head
# PR on the above
- hbrunn 15.0-hr_attendance_missing_days
# https://github.com/OCA/hr-attendance/pull/141
- oca refs/pull/141/head
# https://github.com/OCA/hr-attendance/pull/142
Expand Down
5 changes: 5 additions & 0 deletions verdigado_attendance/tests/test_overtime_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ def test_calculation_employeeA(self):
attendance.check_out += timedelta(hours=1)
self.assertOvertime(employeeA, "2023-08-06", 9 * 60, 0)

# be sure that a day spanning attendance generates overtime records for all days
attendance.check_out += timedelta(days=1)
self.assertOvertime(employeeA, "2023-08-06", 33 * 60, 0)
self.assertOvertime(employeeA, "2023-08-07", 0, 8 * 60)

def to_time(self, time_string):
if isinstance(time_string, str):
return datetime.strptime(time_string, "%H:%M:%S").time()
Expand Down

0 comments on commit 16095a3

Please sign in to comment.