Thursday, March 7, 2024
1 change · 17.0
Resolved issues and error corrections
This fix resolves an issue where changing the date of a recurring shift would incorrectly set all shifts in the recurrence to the same date. The system now properly calculates and applies date changes based on the recurrence pattern (weekly, monthly, etc.), ensuring each shift maintains its correct position in the schedule while reflecting the user's date adjustment.
Original PR description
Steps: - create a shift recurrency every week and save - go back to the shift, and set another date - select "edit: all shifts" and save Issue: All shifts are set to the same date. Cause: We find all shift of the recurrence and apply them the same values. Fix: Pop those field from the value. Then, depending on the unit of the recurrence, we compute which day of the week/month the new date is. Apply it to all shifts, and if we don't have the 2 dates, recalculate the start based on the new end or inversely. opw-3571081 Forward-Port-Of: odoo/enterprise#57817 Forward-Port-Of: odoo/enterprise#51784