summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormreficent <miquel.raich@eficent.com>2018-09-21 15:55:44 +0200
committerMartin Trigaux <mat@odoo.com>2018-09-24 10:33:57 +0200
commita2632331fb71d571eaffbfbd39e813af145b97e5 (patch)
treef10cf78b3e6313a71e5352c1f49fa1e6bd3a0136
parent19523ea21bb580531937295eefdd889c0f93cf6d (diff)
[FIX] account: fix undefined variable type
Commit 82e1aed split a method in two methods and the field type was not copied Closes #27159
-rw-r--r--addons/account/models/account_invoice.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index 7847f238e08..7136060f323 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -1720,9 +1720,9 @@ class AccountInvoiceLine(models.Model):
self.ensure_one()
if not self.product_id:
return ''
-
+ invoice_type = self.invoice_id.type
rslt = self.product_id.partner_ref
- if type in ('in_invoice', 'in_refund'):
+ if invoice_type in ('in_invoice', 'in_refund'):
if self.product_id.description_purchase:
rslt += '\n' + self.product_id.description_purchase
else: