Commit 3889716
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#114563
Signed-off-by: William Henrotin (whe) <whe@odoo.com>1 parent e9db47c commit 3889716
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1551 | 1551 | | |
1552 | 1552 | | |
1553 | 1553 | | |
1554 | | - | |
| 1554 | + | |
| 1555 | + | |
1555 | 1556 | | |
1556 | 1557 | | |
1557 | 1558 | | |
| |||
0 commit comments