details: https://code.tryton.org/tryton/commit/2232208153c6
branch: 8.0
user: Cédric Krier <[email protected]>
date: Fri Jun 12 23:42:19 2026 +0200
description:
Set shipment address only when empty when changing party of sale
amendment
Closes #14796
(grafted from 1a003fa7e62b9f5c0cda4494197e6553a585f7b9)
diffstat:
modules/sale_amendment/sale.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 1e1055989958 -r 2232208153c6 modules/sale_amendment/sale.py
--- a/modules/sale_amendment/sale.py Fri Jun 12 23:44:04 2026 +0200
+++ b/modules/sale_amendment/sale.py Fri Jun 12 23:42:19 2026 +0200
@@ -401,7 +401,7 @@
@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 @@
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)):