Skip to content
Snippets Groups Projects
Commit 6a61d1c4 authored by Audric Onockx (auon)'s avatar Audric Onockx (auon)
Browse files

[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: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
parent 4d851752
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment