details: https://code.tryton.org/tryton/commit/0d96a4b8d2ad
branch: default
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
diffstat:
modules/web_shop_shopify/sale.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r 47b5288eef79 -r 0d96a4b8d2ad modules/web_shop_shopify/sale.py
--- a/modules/web_shop_shopify/sale.py Thu Jan 15 14:41:53 2026 +0100
+++ b/modules/web_shop_shopify/sale.py Thu Jan 15 15:22:09 2026 +0100
@@ -556,6 +556,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)
@@ -578,6 +579,9 @@
shipment.set_shopify_identifier(
self, gid2id(fulfillment['id']))
Transaction().commit()
+ # Start a new transaction as commit release the lock
+ self.__class__.__queue__._process_shopify(self)
+ return
elif shipment.state == 'cancelled':
fulfillment_id = shipment.get_shopify_identifier(self)
if fulfillment_id: