From a2632331fb71d571eaffbfbd39e813af145b97e5 Mon Sep 17 00:00:00 2001 From: mreficent Date: Fri, 21 Sep 2018 15:55:44 +0200 Subject: [PATCH] [FIX] account: fix undefined variable type Commit 82e1aed split a method in two methods and the field type was not copied Closes #27159 --- addons/account/models/account_invoice.py | 4 ++-- 1 file 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: