Assign only customer shipment with supplied quantities

Closes #11959
This commit is contained in:
Cédric Krier
2023-01-01 17:08:48 +01:00
parent e745f06e5f
commit 955201d97f
+2 -1
View File
@@ -190,6 +190,7 @@ class Line(metaclass=PoolMeta):
pool = Pool()
Uom = pool.get('product.uom')
Move = pool.get('stock.move')
ShipmentOut = pool.get('stock.shipment.out')
if self.supply_state != 'supplied':
return
@@ -220,7 +221,7 @@ class Line(metaclass=PoolMeta):
moves = set()
for move in self.moves:
if move.shipment:
if isinstance(move.shipment, ShipmentOut):
for inv_move in move.shipment.inventory_moves:
if inv_move.product.id == self.product.id:
moves.add(inv_move)