changeset d16ac082679b in modules/stock_split:5.6
details:
https://hg.tryton.org/modules/stock_split?cmd=changeset&node=d16ac082679b
description:
Always round remainder even if it is less than quantity
issue10227
review338211002
(grafted from 9026b26fa55cc3a11b09df83516d3f3586fab587)
diffstat:
stock.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r f71210b8d7b7 -r d16ac082679b stock.py
--- a/stock.py Fri Jan 01 17:18:03 2021 +0100
+++ b/stock.py Fri Apr 30 13:32:26 2021 +0200
@@ -58,9 +58,9 @@
'uom': uom.id,
}))
remainder -= quantity
- remainder = uom.round(remainder)
if count:
count -= 1
+ remainder = uom.round(remainder)
assert remainder >= 0
if remainder:
with Transaction().set_context(_stock_move_split=True):