From ea67ca4242fe8489912f366d8443157a6cb80a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 13 Jul 2026 18:26:34 +0200 Subject: [PATCH] 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 --- modules/sale/sale.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/sale/sale.py b/modules/sale/sale.py index 9688dc9302..e9b19eeaf4 100644 --- a/modules/sale/sale.py +++ b/modules/sale/sale.py @@ -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