-
- Downloads
[FIX] mrp: compare float thanks to `float_compare`
In some situations, the user can't redefine the quantity to produce of a
MO
To reproduce the issue:
(Use demo data. Enable debug mode)
1. In Decimal Accuracy, edit Product Unit of Measure:
- Digits: 5
2. Create a MO:
- Product: [FURN_7023] Wood Panel
- Quantity To Produce: 1000
3. Produce 800
4. Update the Quantity To Produce: 800
Error: An error message is displayed: "You have already processed
800.00000. Please input a quantity higher than 800.00000"
Due to a floating point issue, the produced quantity is actually
800.0000000000001 which is greater than 800. This is the reason why the
`UserError` is raised
Some similar issues might be found with the other float comparisons in
`change_prod_qty`.
OPW-2689831
closes odoo/odoo#80388
Signed-off-by:
Arnold Moyaux <arm@odoo.com>
Please register or sign in to comment