Confirmed sale without invoice
Which sales orders were confirmed and have not been invoiced yet, and how much do they add up to?
Verified Metric version 1.3.0
What it is
Confirmed sales orders (state = sale) with invoicing pending (invoice_status = to invoice). Value = what is left to invoice, line by line: quantity ordered minus invoiced, times the discounted price, before taxes.
What it is not
- It is not a quotation: a draft or sent quote is not a sale yet.
- It is not the order total: a partly invoiced order counts only with what is left.
- It is not an undelivered order: what matters here is the invoice, delivered or not.
Pitfalls this metric handles
The traps a hasty calculation falls into — and how this metric avoids each one.
Quotation counted as a sale
- The mistake
- Filtering only invoice_status = to invoice, ignoring the order state.
- Why it happens
- Quotations and cancelled orders are not sales; adding them inflates the number.
- How we handle it
- Require state = sale (confirmed order).
Whole order instead of what is left
- The mistake
- Adding the order's amount_untaxed.
- Why it happens
- A partly invoiced order is still 'to invoice', but only the missing part is uncollected revenue.
- How we handle it
- Add per line (quantity ordered − invoiced) × price × (1 − discount). A fully invoiced line does not count.
Age from the UTC date
- The mistake
- Computing how many days the order has waited straight from date_order.
- Why it happens
- date_order is a UTC datetime; an order placed at 10 p.m. shows one extra day.
- How we handle it
- Convert date_order to UTC−3 before counting days.
Invoiced without an authorized tax document (localizations)
- The mistake
- Taking an order with invoice_status = invoiced as an order with an invoice.
- Why it happens
- In localizations with electronic tax documents, the posted invoice and the tax document are different things: the invoice can be posted while the tax document is still being prepared, rejected or waiting for the tax authority. Odoo says the order is invoiced; the customer has no valid document.
- How we handle it
- Read the posted customer invoices whose electronic tax document is not valid and show them in a separate alert, with the amount, without adding them to the total left to invoice.
Where the number comes from
Audit trail
- Odoo model
sale.order + sale.order.line- Fields
sale.order.state,sale.order.invoice_status,sale.order.date_order,sale.order.partner_id,sale.order.line.product_uom_qty,sale.order.line.qty_invoiced,sale.order.line.qty_delivered,sale.order.line.price_unit,sale.order.line.discount- Why this path
- invoice_status is what Odoo itself computes to say 'there is something to invoice'. The lines give how much is left, which is the money at stake.
How you can adjust it
| Parameter | What it does | Options |
|---|---|---|
| Companies | company ids, always explicit | — |
| Period | {from, to}: only orders confirmed in this window (local date); without a period, all | — |
| Filters | narrow down by customers (list of ids) | customers |
| Group by | breakdown of the amount to invoice inside each company | company, customer, and month |
| Sort by | order of the listed orders | amount and age |
| Items listed | how many orders to detail per company; 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 24, 2026
- Checked against
- Method from the Sep 28, 2026 survey in the collection, tested against the demo database and checked on Odoo Community 14 and 16 to 20, with the confirmed orders, quotations and cancelled orders of the same data. The localization alert (invoice without an authorized tax document) was only tested against the demo database. To be validated on a real database.
- Expected Odoo versions
14.0,16.0,17.0,18.0,19.0,20.0,saas~19.2+e,saas~19.3+e- Note
- Does not use read_group. An invoice-on-delivery policy changes what is 'to invoice'; Odoo already accounts for it in invoice_status.
Need a variation of this metric, or another one that does not exist yet?