Set Shopify warehouse on sale line only if it has changed

Closes #14995
(grafted from 2c1a865682ab07758f4b9319f47cfc2b51df1a83)

--HG--
branch : 8.0
This commit is contained in:
Cédric Krier
2026-08-06 10:52:54 +02:00
parent f5b81e02f7
commit 228e760ab9
+1 -1
View File
@@ -898,7 +898,7 @@ class Line(IdentifierMixin, metaclass=PoolMeta):
line.sale = sale
line.shopify_identifier = gid2id(line_item['id'])
line.product = None
line.shopify_warehouse = warehouse
setattr_changed(line, 'shopify_warehouse', warehouse)
assert line.shopify_identifier == gid2id(line_item['id'])
if line_item['variant'] and line_item['variant']['id']:
if product := Product.search_shopify_identifier(