Commit dbaf8da
committed
[FIX] mrp: compare the quantities with float compare
Steps to reproduce the bug:
- Go to decimal accuracy > product unit of measure
- Change the Digits from 2 to 4
- Create a storable product “P1”:
- Create a BoM:
- Add 1 unit of a component
- Create a MO:
- Product : P1
- Qty to produce: 41,0654
- Confirm the MO
- click on Action and try to split the MO in two:
- MO_1: qty 35,9757
- MO_2: qty 5,0897
- Validate the split
Problem:
A user error is triggered, “Unable to split with more than the quantity
to produce.”
While (35,9757 + 5,0897) = 41,0654
we have to use `float_compare` to avoid this kind of error
opw-3178441
closes odoo#114602
X-original-commit: 3889716
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>1 parent f24a87b commit dbaf8da
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1571 | 1571 | | |
1572 | 1572 | | |
1573 | 1573 | | |
1574 | | - | |
| 1574 | + | |
| 1575 | + | |
1575 | 1576 | | |
1576 | 1577 | | |
1577 | 1578 | | |
| |||
0 commit comments