Net sales
How much did I really sell, adding point of sale and invoices, already net of returns?
Verified Metric version 1.3.0
What it is
Point-of-sale revenue before taxes (paid, closed or invoiced orders) plus posted customer invoices, minus returns (credit notes and negative point-of-sale orders). A point-of-sale order that also got an invoice counts once, through the invoice. Where a localization issues electronic tax documents, only the sales documents count. Point-of-sale days are cut at midnight Brasília time (UTC−3).
What it is not
- It is not the total with taxes: it is revenue before taxes, the base for margin and commission.
- It is not the confirmed sales order: an order without an invoice is not an invoiced sale (see the 'Confirmed sale without invoice' metric).
- It is not cash received: a sale on credit counts on the day of the sale, not the day of payment.
Pitfalls this metric handles
The traps a hasty calculation falls into — and how this metric avoids each one.
Counting the invoiced counter sale twice
- The mistake
- Adding every point-of-sale order and every customer invoice.
- Why it happens
- When the counter customer asks for an invoice, Odoo creates an invoice linked to the order (pos.order.account_move). The same sale shows up on both sides.
- How we handle it
- A point-of-sale order with a posted invoice is left out of the point-of-sale side and counted through the invoice, on the invoice date. The number of orders left out shows in the audit trail.
Forgotten returns
- The mistake
- Adding only sales invoices (out_invoice) and positive orders.
- Why it happens
- A return is a separate document: a credit note (out_refund) or a negative point-of-sale order. Without it, net sales look larger than they were.
- How we handle it
- Add out_refund with Odoo's sign (amount_untaxed_signed is already negative) and negative point-of-sale orders; show returns separately in the breakdown.
Month cut in UTC
- The mistake
- Filtering pos.order.date_order by calendar day, as Odoo stores it.
- Why it happens
- Odoo stores date and time in UTC. A sale at 10 p.m. on the last day of the month, Brasília time, is already next month in UTC.
- How we handle it
- Convert the period bounds from UTC−3 to UTC before filtering, and group by local date. invoice_date is a plain date and needs no conversion.
Value with taxes
- The mistake
- Using amount_total from the order and the invoice.
- Why it happens
- The total includes taxes that are not the company's revenue.
- How we handle it
- Invoice: amount_untaxed_signed. Point of sale: amount_total − amount_tax.
Bonus and shipments counted as sales (OCA)
- The mistake
- Adding up every outgoing fiscal document of a localization module.
- Why it happens
- In some localizations, bonus goods, simple shipments and simple billing are also outgoing tax documents, and a sales return is an incoming one. Adding by the document's direction counts gifts as revenue and misses the return.
- How we handle it
- Count by fiscal operation: only the sale type adds and only the sales return type (sale_refund) subtracts. Invoices being typed, cancelled or not cleared by the tax authority stay out.
Where the number comes from
Audit trail
- Odoo model
account.move- Fields
account.move.move_type,account.move.state,account.move.invoice_date,account.move.amount_untaxed_signed,account.move.l10n_latam_document_type_id.code,pos.order.state,pos.order.date_order,pos.order.amount_total,pos.order.amount_tax,pos.order.account_move- Why this path
- A posted customer invoice is the sale accounting recognizes; the point-of-sale order is the counter sale, which only becomes an invoice when the customer asks for one. Together they are the whole revenue, as long as a point-of-sale order that became an invoice is counted once.
How you can adjust it
| Parameter | What it does | Options |
|---|---|---|
| Companies | company ids, always explicit | — |
| Period | {from, to} in local dates; without a period, from the 1st day 11 months ago to today | — |
| Filters | narrow down by customers (list of ids) | customers |
| Group by | breakdown of revenue inside each company | company, month, and day |
| Sort by | order of the breakdown rows | period and amount |
| Items listed | how many breakdown rows to list; the total always covers the whole period | — |
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 monthly point-of-sale and invoice sales script in the collection, tested against the demo database and checked on Odoo Community 14 and 16 to 20 with the same data: with the tax document on the invoice (17, 19 and 20) and in the OCA fiscal document (14, 16 and 18), the same total. Without a Latin American localization, tested against the demo database. Point of sale is not in the homologation yet. 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
- Without the point-of-sale module, only invoices are counted. Does not use read_group. Without a Latin American localization (Odoo in the US, for example), every posted customer invoice counts; with one, only the electronic sales invoice, from the official localization or from the OCA fiscal document.
Need a variation of this metric, or another one that does not exist yet?