@@ -556,6 +556,7 @@ class Sale(IdentifierMixin, metaclass=PoolMeta):
|
||||
"""
|
||||
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 @@ class Sale(IdentifierMixin, metaclass=PoolMeta):
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user