odoo/odoo#201014

Created by Training, Louis Gobert (loug)
Closed
label
odoo-dev:saas-17.4-mrp-fix-multiple-work-center-rounding-loug
head
27caf2ceaab5515aed749d229672f1d94b78dab2
odoo/odoo
saas-17.4 #201014

[FIX] mrp{_account}: round values before summing

Rounding issue can occurs when validating MO under certain conditions.

Steps to reproduce:
- Create three work centers with different expense accounts:
- First: hourly cost of 4.11
- Second: hourly cost of 4.23
- Third: hourly cost of 2.25
- Create an MO for a product with real-time valuation and 3 work orders (one per work center).
- Each work order has an expected duration of 2790:00
- Attempt to click on "Produce All" button.

This leads to an unbalanced move error.
This fix rounds the values before summing them to prevent rounding issues and unbalanced moves. It also corrects the displayed value in the Manufacturing Order overview.

opw-4631409