[FIX] account: prioritize supplier number over reference on invoice
When generating the accounting entries, to compute the name, the invoice reference (e.g. origin purchase order name) was first used before the supplier invoice number. To facilate reconciliation of bank statements, the supplier invoice number makes more sense. Fixes #3839, opw 618765
This commit is contained in:
parent
a6493f77af
commit
223c92f3c0
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue