summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorMeghna Jaswani <mja@odoo.com>2019-09-17 13:39:21 +0000
committerfw-bot <otis@odoo.com>2019-10-01 15:59:59 +0000
commit5e240146aa653e02f2ec028ec07ed28961cacd68 (patch)
tree8709e643e1ac50e042f0641f97f2e5b987189424 /addons
parentce879f2be47971559676a13b92a8683b9f641ccf (diff)
[FIX] sale: correctly set default fiscal position on invoice
default fiscal position of previously selected partner is not getting cleared up when current selected partner doesn't have a default one task: 2071608 closes: #37231 $XX closes odoo/odoo#37728 X-original-commit: bce4bcc61196bbeafb41f77b7a95051b225faea6 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/sale/models/account_invoice.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/sale/models/account_invoice.py b/addons/sale/models/account_invoice.py
index d984f1d4a11..43591607a45 100644
--- a/addons/sale/models/account_invoice.py
+++ b/addons/sale/models/account_invoice.py
@@ -45,12 +45,12 @@ class AccountMove(models.Model):
@api.onchange('partner_id')
def _onchange_partner_id(self):
# OVERRIDE
- res = super(AccountMove, self)._onchange_partner_id()
-
# Recompute 'partner_shipping_id' based on 'partner_id'.
addr = self.partner_id.address_get(['delivery'])
self.partner_shipping_id = addr and addr.get('delivery')
+ res = super(AccountMove, self)._onchange_partner_id()
+
# Recompute 'narration' based on 'company.invoice_terms'.
if self.type == 'out_invoice':
self.narration = self.company_id.with_context(lang=self.partner_id.lang).invoice_terms