details: https://code.tryton.org/tryton/commit/28cae9983afc
branch: default
user: Cédric Krier <[email protected]>
date: Thu Nov 13 15:23:47 2025 +0100
description:
Lock web shops when fetching order from Shopify
It is needed to avoid to fill the ir.error table with unique constraint
error
on the web ID when the method is called in parallel by tasks posted
from the
webhook.
Closes #14360
diffstat:
modules/web_shop_shopify/web.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 6861e9cfe2ae -r 28cae9983afc modules/web_shop_shopify/web.py
--- a/modules/web_shop_shopify/web.py Tue Oct 28 11:45:10 2025 +0100
+++ b/modules/web_shop_shopify/web.py Thu Nov 13 15:23:47 2025 +0100
@@ -484,6 +484,7 @@
shops = cls.search([
('type', '=', 'shopify'),
])
+ cls.lock(shops)
for shop in shops:
last_sales = Sale.search([
('web_shop', '=', shop.id),