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:
Cédric Krier
2026-07-29 19:30:48 +02:00
parent 234ca3f7fd
commit f33ae566f3
+2 -2
View File
@@ -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)