26 lines
904 B
Diff
26 lines
904 B
Diff
diff --git a/tryton/modules/stock_lot/stock.py b/tryton/modules/stock_lot/stock.py
|
|
index 734018dbe8..1367b57e5f 100644
|
|
--- a/tryton/modules/stock_lot/stock.py
|
|
+++ b/tryton/modules/stock_lot/stock.py
|
|
@@ -420,8 +420,7 @@ class Move(metaclass=PoolMeta):
|
|
|
|
def check_lot(self):
|
|
"Check if lot is required"
|
|
- if (self.state == 'done'
|
|
- and self.internal_quantity
|
|
+ if (self.internal_quantity
|
|
and not self.lot
|
|
and self.product.lot_is_required(
|
|
self.from_location, self.to_location)):
|
|
@@ -430,8 +429,9 @@ class Move(metaclass=PoolMeta):
|
|
product=self.product.rec_name))
|
|
|
|
@classmethod
|
|
- def validate(cls, moves):
|
|
- super(Move, cls).validate(moves)
|
|
+ @ModelView.button
|
|
+ def do(cls, moves):
|
|
+ super().do(moves)
|
|
for move in moves:
|
|
move.check_lot()
|