Skip to content

CookiesWe use the cookies the site needs to work. Analytics and marketing only turn on with your permission. Privacy policy

My choices
What stays on

Your choice lasts 12 months. To change it, open “Cookies” in the footer.

IntData
IntData · https://intdata.com.br/en/metrics/purchases-by-vendor · November 30, 2026

Purchases by vendor

How much did I buy from each vendor, in how many bills, and in how many days do I really pay?

Verified Metric version 1.1.0

What it is

Sum of the vendor bills posted in the period (by bill date), taxes included, minus refunds, per vendor. Along with it: the number of bills, the average agreed term (from issue to the due date of each installment) and the average term actually practised (from issue to the reconciled payment of each paid installment), both weighted by amount. The comparison is with the previous period of the same length.

What it is not

  • It is not the purchase order: an order without a posted bill does not count.
  • It is not what was paid in the period: it is what was billed. Payment only enters the practised term.
  • It does not use the document due date for the term: it uses each installment's.
  • The practised term does not include open installments: they do not have a term yet.

Pitfalls this metric handles

The traps a hasty calculation falls into — and how this metric avoids each one.

Term by document due date

The mistake
Measuring the term by account.move.invoice_date_due.
Why it happens
It is the due date of the last installment: a 30/60/90 purchase becomes a 90-day term.
How we handle it
Measure installment by installment, weighted by amount.

Term by the registered payment date

The mistake
Using the payment entry date, or today's date for a paid bill.
Why it happens
The payment may be entered long after it left the bank.
How we handle it
Use the installment's reconciliation date (max_date), the one Odoo stores when settling.

Purchase refund

The mistake
Adding the refund to the vendor as a purchase.
Why it happens
The amount bought grows with what was sent back.
How we handle it
The refund (in_refund) comes in negative and does not count as a bill.

Sign

The mistake
The vendor bill's amount_total_signed is negative.
Why it happens
Odoo convention: the signed amount follows the accounting side (credit).
How we handle it
Use the absolute value, signed by the document type.

Where the number comes from

Audit trail

Odoo model
account.move + account.move.line + account.partial.reconcile
Fields
account.move.amount_total_signed, account.move.invoice_date, account.move.line.date_maturity, account.move.line.balance, account.partial.reconcile.max_date
Why this path
The amount comes from the bill; the terms come from the bill's payable installments and the reconciliation of each one, which keeps the date the payment settled it.

How you can adjust it

ParameterWhat it doesOptions
Companies company ids, always explicit —
Period {from, to} by bill date, or relative; without a period, the last 90 days —
Filters narrow down by vendors (list of ids) vendors
Group by the table row: vendor, or vendor by month vendor and month
Sort by order of the vendors amount, name, practised term, and change
Items listed how many vendors to list; the total always covers the whole set —

Validation

To be validated on a real database. The method comes from a script that already ran in a customer's operation, and the calculation passes the automated tests against the demo database. IntData has not yet checked it on a real database; until then, check the first result in Odoo using the path in the audit trail.

Date
October 25, 2026
Checked against
The demo database, bill by bill and installment by installment, and the test Odoo servers. To be validated on a real database.
Expected Odoo versions
14.0, 16.0, 17.0, 18.0, 19.0, 20.0
Note
Does not use read_group. The reconciliation date (max_date) exists in every supported version.

Need a variation of this metric, or another one that does not exist yet?