changeset c6b92e1e5487 in modules/sale_shipment_tolerance:5.6
details:
https://hg.tryton.org/modules/sale_shipment_tolerance?cmd=changeset;node=c6b92e1e5487
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 5804aa2a6be9 -r c6b92e1e5487 sale.py
--- a/sale.py Mon May 04 12:28:56 2020 +0200
+++ 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