changeset 942ec3917dcf in modules/stock_lot_unit:default
details:
https://hg.tryton.org/modules/stock_lot_unit?cmd=changeset&node=942ec3917dcf
description:
Only test inventory units for lines with quantity
issue10821
review366031002
diffstat:
stock.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 815fa17146b7 -r 942ec3917dcf stock.py
--- a/stock.py Thu Sep 23 23:12:35 2021 +0200
+++ b/stock.py Wed Oct 13 11:02:43 2021 +0200
@@ -123,7 +123,9 @@
def confirm(cls, inventories):
for inventory in inventories:
for line in inventory.lines:
- if (line.lot and line.lot.unit
+ if (line.quantity is not None
+ and line.lot
+ and line.lot.unit
and line.quantity > line.lot.unit_quantity):
raise LotUnitQuantityError(
gettext('stock_lot_unit.msg_lot_unit_quantity_greater',