diff --git a/stock_lot_check_moves_without_lot_before_lot_required.diff b/stock_lot_check_moves_without_lot_before_lot_required.diff index 54a5464..3f0bbdd 100644 --- a/stock_lot_check_moves_without_lot_before_lot_required.diff +++ b/stock_lot_check_moves_without_lot_before_lot_required.diff @@ -43,7 +43,7 @@ diff -r 04443e7121ac trytond/trytond/modules/stock_lot/product.py + + cursor = Transaction().cursor + -+ sql_where = ((move.lot == Null) & (template.id == self.id) & (move.state == 'done')) ++ sql_where = ((move.lot == Null) & (template.id == self.id) & (move.state == 'done') & (move.quantity > 0)) + query = move.join( + product, condition=product.id == move.product).join( + template, condition=template.id == product.template).join(