diff --git a/modules/web_shop_shopify/stock.py b/modules/web_shop_shopify/stock.py index 4d56655f9a..9d656e9aed 100644 --- a/modules/web_shop_shopify/stock.py +++ b/modules/web_shop_shopify/stock.py @@ -61,6 +61,7 @@ class ShipmentOut(metaclass=PoolMeta): }, }, }, + 'status': None, }, }, }) @@ -202,6 +203,8 @@ class Move(metaclass=PoolMeta): quantity = int(Uom.compute_qty( self.unit, self.quantity, self.origin.unit)) for fulfillment_order in fulfillment_orders['nodes']: + if fulfillment_order['status'] in {'CANCELLED', 'CLOSED'}: + continue if (fulfillment_order['assignedLocation']['location']['id'] != location_id): continue