From a127ced8d1fc20af2064c7fd11f23a9dba9ac347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Tarroja=20Caubet?= Date: Fri, 12 Jun 2026 23:44:04 +0200 Subject: [PATCH] Add missing invoice address when changing party of amendment Closes #14796 --- modules/purchase_amendment/purchase.py | 2 +- modules/sale_amendment/sale.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/purchase_amendment/purchase.py b/modules/purchase_amendment/purchase.py index cae58157f7..9d4cbea2e0 100644 --- a/modules/purchase_amendment/purchase.py +++ b/modules/purchase_amendment/purchase.py @@ -376,7 +376,7 @@ class AmendmentLine(ModelSQL, ModelView): self.product = self.product_supplier = self.description = None self.quantity = self.unit = self.unit_price = None - @fields.depends('party', 'invoice_party') + @fields.depends('party', 'invoice_party', 'invoice_address') def on_change_party(self): if not self.invoice_party: self.invoice_address = None diff --git a/modules/sale_amendment/sale.py b/modules/sale_amendment/sale.py index 82d304f0ee..cd5da2526f 100644 --- a/modules/sale_amendment/sale.py +++ b/modules/sale_amendment/sale.py @@ -399,7 +399,9 @@ class AmendmentLine(ModelSQL, ModelView): self.product = self.quantity = self.unit = self.unit_price = None self.description = None - @fields.depends('party', 'invoice_party', 'shipment_party', 'warehouse') + @fields.depends( + 'party', 'invoice_party', 'invoice_address', + 'shipment_party', 'warehouse') def on_change_party(self): if not self.invoice_party: self.invoice_address = None