odoo/odoo#218310
Created by Vincent Ethan
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:16.0-opw-4795463-workcenter-oee-no-intermediary-rounding
- head
- 22d9cd02f7269b60c29913aac03e6c32c5fcaa00
- merged
- 4 days ago by Logistics, Quentin Wolfs (quwo)
| odoo/odoo | |
|---|---|
| 17.0 | #218310 |
| 18.0 | #232730 missing r+ |
| saas-18.2 | |
| saas-18.3 | |
| saas-18.4 | |
| 19.0 | |
| master |
[FIX] mrp: dont compute oee with intermediary rounding
Current behavior:
The form view for a workcenter has an OEE smart button which can display a different value from the real OEE displayed by the mrp_workcenter_productivity_report_oee displayed when actually clicking the button and looking at the report.
Expected behavior:
Same values
Steps to reproduce:
1. Make a workcenter and a BoM with an operation performed at the workcenter
-
Use the BoM in an MO such that there is some un-productive time (e.g., recorded production duration takes longer than expected duration)
* example: 0:20 expected, 1:01 actual -
Go to the workcenter list view -> click on the created workcenter -> look at OEE smart button display value -> click on it to see report -> report values are different
Cause of the issue:
the oee field on the workcenter is computed with rounded intermediary blocked_time and productive_time values, the actual report uses the raw values.
Fix:
Don't use the rounded intermediary values in computing oee.
Post-this-diff, we actually do one less _read_group (along with computing a more accurate field value).