diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index d7f4b53d134..2486d70c9e8 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1142,7 +1142,7 @@ class account_invoice(models.Model): else: ref = self.number partner = self.partner_id._find_accounting_partner(self.partner_id) - name = name or self.invoice_line.name or self.number + name = name or self.invoice_line[0].name or self.number # Pay attention to the sign for both debit/credit AND amount_currency l1 = { 'name': name,