[FIX] account: fix undefined variable type

Commit 82e1aed split a method in two methods and the field type was not copied

Closes #27159
This commit is contained in:
mreficent
2018-09-24 10:33:57 +02:00
committed by Martin Trigaux
parent 19523ea21b
commit a2632331fb
+2 -2
View File
@@ -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: