From e95e3f989fa77ef91b0aad679fe29a68a55dbfb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 5 May 2026 00:11:08 +0200 Subject: [PATCH] Do not reset to quotation Shopify order already processed After a refund the authorized payment amount may be lower than the amount to pay but the sale should still stay in processing or done state. Closes #14816 --- modules/web_shop_shopify/web.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/web_shop_shopify/web.py b/modules/web_shop_shopify/web.py index 064e4c541f..92253638ff 100644 --- a/modules/web_shop_shopify/web.py +++ b/modules/web_shop_shopify/web.py @@ -880,7 +880,8 @@ class Shop(metaclass=PoolMeta): for sale in to_update: if sale.party == sale.web_shop.guest_party: continue - if sale.payment_amount_authorized >= sale.amount_to_pay: + if (sale.payment_amount_authorized >= sale.amount_to_pay + or sale.state in {'processing', 'done'}): to_process.append(sale) else: to_quote.append(sale)