changeset d3efc129db7b in modules/sale_shipment_tolerance:default
details:
https://hg.tryton.org/modules/sale_shipment_tolerance?cmd=changeset;node=d3efc129db7b
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
diffstat:
sale.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r cde7be4ab482 -r d3efc129db7b sale.py
--- a/sale.py Thu Jul 09 10:21:06 2020 +0100
+++ b/sale.py Thu Oct 08 21:29:24 2020 +0200
@@ -18,6 +18,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