details:   https://code.tryton.org/tryton/commit/41dd6fd9665a
branch:    7.0
user:      Cédric Krier <[email protected]>
date:      Sat Oct 11 15:06:20 2025 +0200
description:
        Do not create Shopify fulfillment orders with a quantity of zero

        Closes #14286
        (grafted from dc5b77dfdc5155c07ec241e20228e3479a91a372)
diffstat:

 modules/web_shop_shopify/stock.py |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (19 lines):

diff -r 65157ad3af29 -r 41dd6fd9665a modules/web_shop_shopify/stock.py
--- a/modules/web_shop_shopify/stock.py Mon Sep 22 10:24:39 2025 +0200
+++ b/modules/web_shop_shopify/stock.py Sat Oct 11 15:06:20 2025 +0200
@@ -157,10 +157,11 @@
             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

Reply via email to