Get pending moves that is not cancelled or done

#163463
This commit is contained in:
Raimon Esteve 2023-11-21 07:52:18 +01:00
parent ae34f5c19d
commit 800a0bfcc5
1 changed files with 2 additions and 1 deletions

View File

@ -202,7 +202,8 @@ class StockScanMixin(object):
return {}.fromkeys([s.id for s in shipments], scanner_enabled)
def get_pending_moves(self, name):
return [x.id for x in self.get_pick_moves() if x.pending_quantity > 0]
return [x.id for x in self.get_pick_moves()
if (x.pending_quantity > 0 and x.state not in ('cancelled', 'done'))]
@classmethod
def set_pending_moves(cls, shipments, name, value):