Daily updates from Odoo
Saturday, November 30, 2024
2 changes
Enhancements to existing features
Payroll payslips now use a more efficient way to retrieve worked-days information, reducing unnecessary database work. This should improve payroll processing performance, especially for companies handling many payslips or country-specific payroll reports.
Original PR description
In the payslip, we have a few inefficient methods to get info on the worked days lines. We should always use the _get_worked_days_line_values method which only does 1 SQL query. Task: 4188372
Planning shifts that span a weekend are now split into more accurate time blocks for flexible and open resources. This prevents incorrect shift times and makes weekend shifts easier to reassign while also improving performance during the split process.
Original PR description
Prior to this commit, a planning slot spanning over a weekend would not get the correct start/end time in the case of flexible resources, since it will try to take the availability of the resource into account. ex: A slot from Sunday 8:00 to Monday 17:00 would be split into two slots - Sunday 8:00 to Sunday 17:00 - Monday 8:00 to Monday 17:00 However, as we do not take working calendars as reference for flexible resource, the expected split should be: - Sunday 8:00 to Sunday 23:59 - Monday 00:00 to Monday 17:00 Additionally: - open slots will also follow the same split as the one for flexible resources. - weekend slots for regular resources will have their start/end time set to 8AM/5PM instead of having empty slots of 0 minutes. This will allow to pass shifts to other flexible resources more easiy. - reduce the number of ORM calls by providing a specific method for the split. task-id: 4074987