details: https://code.tryton.org/tryton/commit/0eb970609f98
branch: 7.8
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 913f7b72f329 -r 0eb970609f98 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: