Daily updates from Odoo
Wednesday, April 10, 2024
1 change · master
Resolved issues and error corrections
Fixed an issue that could prevent the Planning schedule from loading when viewed by role. The system now skips a work-hours calculation when the schedule is not grouped by resource, avoiding an error and allowing planners to access the view normally.
Original PR description
Before this commit, when only planning app is installed and the user goes to Planning > Schedule > By Role, a traceback is raised because the resource_id is not found inside work intervals fetched.…
Before this commit, when only planning app is installed and the user goes to Planning > Schedule > By Role, a traceback is raised because the resource_id is not found inside work intervals fetched. The reason is because `this.row.resId` is the resource id only if the first group is resource_id and not something else and so when the group by is `role_id > resource_id` the `resId` will return the role id and not the resource id. It would mean the compute work hours should not be done when the group by does not start by resource. This commit avoids computing the work hours when the progressField is not a employee, that is, when the group by does not start by resource_id. Affected version(s): master Steps to reproduce the issue: ============================ 1. Install planning app 2. Go to planning > Schedule > By Role Current Behavior: ================ A traceback is occured because a role id is not found inside work intervals per resource id. Expected Behavior: ================= The Gantt view should be loaded without any issue. runbot-61438 X-original-commit: 5831c225