summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2020-11-23 14:01:01 +0000
committerGoffin Simon <sig@odoo.com>2020-11-24 16:22:28 +0000
commitbea4222875b82b96069a20fc68eb15ab4e7a8797 (patch)
tree758acf85db7fb5bfb25fc4605cd6ddb58cf7b3e8 /addons
parent6f0c3e9b23d785d5348817d9a23e34f7d4c1f835 (diff)
[FIX] sale: Wrong lang in terms and conditions
Steps to reproduce the bug: - Let's consider a configuration with two languages L1 and L2 - Go to Settings / Accounting / Customer Invoice / Default term & condition - Define a default text T1 and save - Create a new customer invoice, T1 is displayed in the field narration - Go to Settings / Accounting / Customer Invoice / Default term & condition - Change T1 to T2 for L1, L2 and save - Create a new customer invoice Bug: T2 was displayed in the field narration opw:2388353 closes odoo/odoo#62267 X-original-commit: 98d36b80ed1b4f11491301d3b7b5818d81edf542 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com> Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/sale/models/account_invoice.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale/models/account_invoice.py b/addons/sale/models/account_invoice.py
index 6b66727c58b..c0d5319ab9a 100644
--- a/addons/sale/models/account_invoice.py
+++ b/addons/sale/models/account_invoice.py
@@ -53,7 +53,7 @@ class AccountMove(models.Model):
# Recompute 'narration' based on 'company.invoice_terms'.
if self.move_type == 'out_invoice':
- self.narration = self.company_id.with_context(lang=self.partner_id.lang).invoice_terms
+ self.narration = self.company_id.with_context(lang=self.partner_id.lang or self.env.lang).invoice_terms
return res