Skip to content
Snippets Groups Projects
Commit 8638ec14 authored by JF Aubert's avatar JF Aubert
Browse files

[FIX] mrp(workorder_hr): fix workorder duration


Previously, _intervals_duration (called by _compute_duration)
sometimes loose the last mrp.workcenter.productivity.
A fix has been made.
First, mrp.workcenter.productivity.loss _convert_to_duration
calculates according to the loss type, we have to take that in account.
Second, mrp.workcenter.productivity _close badly generates
performance timers.
For example, test_mrp_employee_analytic_account generated
- productive for 1st employee from 10:00 to 11:00
- performance for 2nd employee from 10:00 to 11:00
- performance for 2nd employee from 11:00 to 11:00 (! duration = 0)
Now, the timers are
- productive for 1st employee from 10:00 to 11:00
- productive for 2nd employee from 10:00 to 11:00
which is correct.

closes odoo/odoo#105410

Task: 2985735
Related: odoo/enterprise#33796
Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent 7dceef12
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