changeset d7f788aaeaa2 in modules/sale_shipment_tolerance:5.4
details:
https://hg.tryton.org/modules/sale_shipment_tolerance?cmd=changeset;node=d7f788aaeaa2
description:
Round tested quantity for under shipment
As the minimal quantity is already rounded we should compare it against
an also
rounded quantity.
Also the sale line does not create a stock move if the remaining
quantity
rounded with the line unit is zero.
issue9648
review294611002
(grafted from d3efc129db7be023c89ff974cd2f832c6e13fdb3)
diffstat:
sale.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 52a6c5cf2903 -r d7f788aaeaa2 sale.py
--- a/sale.py Sat Apr 04 16:47:33 2020 +0200
+++ b/sale.py Thu Oct 08 21:29:24 2020 +0200
@@ -20,6 +20,7 @@
if tolerance is not None:
minimal_quantity = abs(self.quantity * (1 - tolerance))
minimal_quantity = self.unit.round(minimal_quantity)
+ quantity = self.unit.round(quantity)
return quantity <= minimal_quantity
return False