details:   https://code.tryton.org/tryton/commit/1e1055989958
branch:    8.0
user:      Adrià Tarroja Caubet <[email protected]>
date:      Fri Jun 12 23:44:04 2026 +0200
description:
        Add missing invoice address when changing party of amendment

        Closes #14796
        (grafted from e3a3660f987638f51e04c7023c753f2988d938fc)
diffstat:

 modules/purchase_amendment/purchase.py |  2 +-
 modules/sale_amendment/sale.py         |  4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 429ea5ea4566 -r 1e1055989958 modules/purchase_amendment/purchase.py
--- a/modules/purchase_amendment/purchase.py    Thu Jun 11 14:29:17 2026 +0200
+++ b/modules/purchase_amendment/purchase.py    Fri Jun 12 23:44:04 2026 +0200
@@ -376,7 +376,7 @@
             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 -r 429ea5ea4566 -r 1e1055989958 modules/sale_amendment/sale.py
--- a/modules/sale_amendment/sale.py    Thu Jun 11 14:29:17 2026 +0200
+++ b/modules/sale_amendment/sale.py    Fri Jun 12 23:44:04 2026 +0200
@@ -399,7 +399,9 @@
             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

Reply via email to