changeset 1b873f6d463a in modules/sale_shipment_tolerance:default
details:
https://hg.tryton.org/modules/sale_shipment_tolerance?cmd=changeset&node=1b873f6d463a
description:
Accept under shipment if minimal quantity is less then quantity sold
This prevents to consider as shipped the case of a quantity with the
same value
as the rounding.
issue10190
review357431002
diffstat:
sale.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 69ea0f21d781 -r 1b873f6d463a sale.py
--- a/sale.py Sat Dec 19 17:08:47 2020 +0100
+++ b/sale.py Tue Mar 23 23:58:27 2021 +0100
@@ -19,7 +19,7 @@
minimal_quantity = abs(self.quantity * (1 - tolerance))
minimal_quantity = self.unit.round(minimal_quantity)
quantity = self.unit.round(quantity)
- return quantity <= minimal_quantity
+ return quantity <= minimal_quantity < abs(self.quantity)
return False
@property