Check if move has shipment before assigning inventory moves
The moves on sale line do not always have a shipment, for example for drop shipment. issue11217 review427641003
This commit is contained in:
@@ -220,9 +220,10 @@ class Line(metaclass=PoolMeta):
|
||||
|
||||
moves = set()
|
||||
for move in self.moves:
|
||||
for inv_move in move.shipment.inventory_moves:
|
||||
if inv_move.product.id == self.product.id:
|
||||
moves.add(inv_move)
|
||||
if move.shipment:
|
||||
for inv_move in move.shipment.inventory_moves:
|
||||
if inv_move.product.id == self.product.id:
|
||||
moves.add(inv_move)
|
||||
to_write = []
|
||||
to_assign = []
|
||||
for move in moves:
|
||||
|
||||
Reference in New Issue
Block a user