Skip to content
Snippets Groups Projects
Commit 7b5a30fb authored by stcc-odoo's avatar stcc-odoo
Browse files

[FIX] mrp{_account}: consider capacities when computing duration


Related enterprise PR: odoo/enterprise#39669

Steps to reproduce:

Install mrp_workorder
Create Product P1, Workcenter W1
Edit W1 > Specific capacities > Add line: Product = P1, Start time = 5, End time = 5
Create BoM > Product: P1, Operations tab > Add line: Workcenter = WC1, Default duration = 60:00 min > Save
Click on overview stat button
Issue:

The created operation has expected time of 60:00, instead of 70:00. The workcenter start and stop times are considered in this calculation, so the workcenter capacities should be considered too.

Solution:

Use `_get_expected_duration` to compute the expected duration.

opw-3229485

closes odoo/odoo#118360

Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
parent 31b92913
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