From 2cc6581609f0115ea7a44ee4eee8f8eed100a245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 20 Aug 2025 16:29:15 +0200 Subject: [PATCH] Always decrease Shopify sale line by the refunded quantity The restock type is only for the stock level calculation of Shopify which is not useful as Tryton always update the stock level. Closes #14179 --- modules/web_shop_shopify/sale.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/web_shop_shopify/sale.py b/modules/web_shop_shopify/sale.py index c646f2981c..9648d997a4 100644 --- a/modules/web_shop_shopify/sale.py +++ b/modules/web_shop_shopify/sale.py @@ -136,8 +136,7 @@ class Sale(IdentifierMixin, metaclass=PoolMeta): line = id2line.pop(line_item.id, None) quantity = line_item.quantity for refund_line_item in refund_line_items[line_item.id]: - if refund_line_item.restock_type == 'cancel': - quantity -= refund_line_item.quantity + quantity -= refund_line_item.quantity lines.append(Line.get_from_shopify( sale, line_item, quantity, line=line)) for shipping_line, line in zip_longest(