Thursday, October 6, 2022
1 change · master
Resolved issues and error corrections
Allocated time now reflects the full scheduled shift, even when the employee or resource was created after the shift start time. This prevents confusing undercounts during onboarding and also uses the resource calendar when no contract exists.
Original PR description
Steps : \- On a new DB (no demo data). Say created at 15:00. \- Go to planning. \- Add a shift for today. \- Set the dates from 08:00 to 17:00. Issue : The 'Allocated Time' = 02:00. Cause : We used…
Steps : \- On a new DB (no demo data). Say created at 15:00. \- Go to planning. \- Add a shift for today. \- Set the dates from 08:00 to 17:00. Issue : The 'Allocated Time' = 02:00. Cause : We used to count from the resource creation min to the departure max. So, in this case, not from 08:00, but from 15:00. While this might seem logical, it confuses users in onboarding. Fix : Calculate the whole time, regardless of the resource lifespan. Notes : \- Similar issues solved with this commit : > Once the shift validated, the avatar progress bar uses the same allocated time. > Same in Project Task gantt view. \- When contract is installed, if the resource does not have a contract, the Allocated Time = 0. Now, it is calculated from the resource calendar. task-2983993 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr