From bdeeb572ac1835e1cb1336b8fd304ff2668d7afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 12 Jun 2026 23:42:19 +0200 Subject: [PATCH] Set shipment address only when empty when changing party of sale amendment Closes #14796 (grafted from 1a003fa7e62b9f5c0cda4494197e6553a585f7b9) --HG-- branch : 8.0 --- modules/sale_amendment/sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sale_amendment/sale.py b/modules/sale_amendment/sale.py index cd5da2526f..4aefbef408 100644 --- a/modules/sale_amendment/sale.py +++ b/modules/sale_amendment/sale.py @@ -401,7 +401,7 @@ class AmendmentLine(ModelSQL, ModelView): @fields.depends( 'party', 'invoice_party', 'invoice_address', - 'shipment_party', 'warehouse') + 'shipment_party', 'shipment_address', 'warehouse') def on_change_party(self): if not self.invoice_party: self.invoice_address = None @@ -410,7 +410,7 @@ class AmendmentLine(ModelSQL, ModelView): if self.party: if not self.invoice_address: self.invoice_address = self.party.address_get(type='invoice') - if not self.shipment_party: + if not self.shipment_address: with Transaction().set_context( warehouse=( self.warehouse.id if self.warehouse else None)):