details: https://code.tryton.org/tryton/commit/a702cd0cecf1
branch: 7.0
user: Cédric Krier <[email protected]>
date: Thu Jan 15 15:22:09 2026 +0100
description:
Lock the sale being processed for Shopify
Closes #14500
(grafted from 0d96a4b8d2ad4a7fd7ea8be06202afeee3d6df19)
diffstat:
modules/web_shop_shopify/sale.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r c0e6068148de -r a702cd0cecf1 modules/web_shop_shopify/sale.py
--- a/modules/web_shop_shopify/sale.py Sat Jan 24 08:51:39 2026 +0100
+++ b/modules/web_shop_shopify/sale.py Thu Jan 15 15:22:09 2026 +0100
@@ -222,6 +222,7 @@
"""
pool = Pool()
Payment = pool.get('account.payment')
+ self.lock()
with self.web_shop.shopify_session():
for shipment in self.shipments:
fulfillment = shipment.get_shopify(self)
@@ -234,6 +235,9 @@
fulfillment.errors.full_messages())))
shipment.set_shopify_identifier(self, fulfillment.id)
Transaction().commit()
+ # Start a new transaction as commit release the lock
+ self.__class__.__queue__._process_shopify(self)
+ return
# TODO: manage drop shipment