Add missing invoice address when changing party of amendment

Closes #14796
This commit is contained in:
Adrià Tarroja Caubet
2026-06-12 23:44:04 +02:00
parent 8feb50c71c
commit a127ced8d1
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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
+3 -1
View File
@@ -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