Do not set a shipment cost method for Shopify order without shipping line
Without a shipping line, there is no carrier selected and thus no shipment cost method to set. Closes #14976 (grafted from 313b466eb1c55ac922819a5b66dc49e081e85064) --HG-- branch : 8.0
This commit is contained in:
@@ -836,8 +836,8 @@ class Sale_ShipmentCost(metaclass=PoolMeta):
|
||||
else:
|
||||
if available_carriers:
|
||||
carrier = available_carriers[0]
|
||||
else:
|
||||
shipment_cost_method = None
|
||||
if not carrier:
|
||||
shipment_cost_method = None
|
||||
setattr_changed(self, 'carrier', carrier)
|
||||
setattr_changed(self, 'shipment_cost_method', shipment_cost_method)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user