From 3d6558faaaf91c376a31f449f096a9cf89233969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 11 Oct 2025 15:06:20 +0200 Subject: [PATCH] Do not create Shopify fulfillment orders with a quantity of zero Closes #14286 --- modules/web_shop_shopify/stock.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/web_shop_shopify/stock.py b/modules/web_shop_shopify/stock.py index 65bc862120..7aa85eab6b 100644 --- a/modules/web_shop_shopify/stock.py +++ b/modules/web_shop_shopify/stock.py @@ -172,10 +172,11 @@ class Move(metaclass=PoolMeta): for line_item in fulfillment_order.line_items: if line_item.line_item_id == identifier: qty = min(quantity, line_item.fulfillable_quantity) - yield fulfillment_order.id, { - 'id': line_item.id, - 'quantity': qty, - } + if qty: + yield fulfillment_order.id, { + 'id': line_item.id, + 'quantity': qty, + } quantity -= qty if quantity <= 0: return