Always use the shipment address of the sale as delivery address for the shipment

The warehouse on the sale is not always filled instead it is the the warehouse
of the shipment that must be used for the comparison. But this makes the test
useless as the shipment address is always used ad delivery address.

Closes #14954
(grafted from d414eccc0ad58a86ba4083f5c5f427b4e41edee7)

--HG--
branch : 8.0
This commit is contained in:
Cédric Krier
2026-07-13 18:26:34 +02:00
parent 9bc74a5eea
commit ea67ca4242
+1 -4
View File
@@ -1049,10 +1049,7 @@ class Sale(
shipment = Shipment(**values)
shipment.on_change_warehouse()
if Shipment.__name__ == 'stock.shipment.out':
if self.shipment_address == self.warehouse.address:
shipment.delivery_address = shipment.warehouse.address
else:
shipment.delivery_address = self.shipment_address
shipment.delivery_address = self.shipment_address
elif Shipment.__name__ == 'stock.shipment.out.return':
shipment.contact_address = values['customer'].address_get()
return shipment