diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index f6ae7995d0f..cb7fb9a8cfe 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -841,7 +841,7 @@ class account_invoice(models.Model): # create one move line for the total and possibly adjust the other lines amount total, total_currency, iml = inv.with_context(ctx).compute_invoice_totals(company_currency, ref, iml) - name = inv.name or inv.supplier_invoice_number or '/' + name = inv.supplier_invoice_number or inv.name or '/' totlines = [] if inv.payment_term: totlines = inv.with_context(ctx).payment_term.compute(total, date_invoice)[0]