-
- Downloads
[FIX] hr,hr_contract,resource: allocate hours before resource creation
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
closes odoo/odoo#102392
Related: odoo/enterprise#32378
Signed-off-by:
Laurent Stukkens (ltu) <ltu@odoo.com>
Showing
- addons/hr/models/resource.py 0 additions, 23 deletionsaddons/hr/models/resource.py
- addons/hr/tests/test_resource.py 1 addition, 30 deletionsaddons/hr/tests/test_resource.py
- addons/hr_contract/models/resource_resource.py 18 additions, 1 deletionaddons/hr_contract/models/resource_resource.py
- addons/hr_contract/tests/test_resource.py 1 addition, 1 deletionaddons/hr_contract/tests/test_resource.py
Loading
Please register or sign in to comment