Set shipment address only when empty when changing party of sale amendment

Closes #14796
(grafted from 1a003fa7e62b9f5c0cda4494197e6553a585f7b9)

--HG--
branch : 8.0
This commit is contained in:
Cédric Krier
2026-06-12 23:42:19 +02:00
parent fa6efc064a
commit bdeeb572ac
+2 -2
View File
@@ -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)):