Tuesday, December 17, 2024
1 change · 17.0
Code cleanup and technical improvements
Attendance overtime calculation logic has been reorganized so it can be reused and customized more easily. This does not change current behavior, but it helps support customer-specific rules such as counting only overtime worked after the scheduled end of the day.
Original PR description
The logic to calculate pre-work time, working time, and post-work time has been extracted to a new method `_get_pre_post_work_time`. This refactor does not alter the existing logic but makes it reusable and easier to override in custom modules. This makes it easier to customize the calculation for specific use cases, such as only considering overtime hours worked after the scheduled end of the day. This adjustment is necessary to meet client requirements that exclude overtime before the start of the working day. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr