Sales by salesperson
How much did each salesperson sell in the period, with the average ticket, against the previous period?
Verified Metric version 1.2.0
What it is
Net sales (point of sale + customer invoices, before taxes, minus returns, without counting twice a point-of-sale order that got an invoice) of each salesperson in the period, with the number of sales, the average ticket (net sales ÷ sales) and the change against the previous period of the same length. The salesperson is the document's: the invoice's on invoices and the cashier's on point of sale.
What it is not
- It is not sales by the customer's assigned salesperson: who sold is the document's, and the portfolio does not always match who served the customer.
- It is not the sum of confirmed orders: an order without an invoice is not a sale (see venda_confirmada_sem_nota).
- It is not commission: no commission rule is applied and receipts are not considered.
Pitfalls this metric handles
The traps a hasty calculation falls into — and how this metric avoids each one.
Customer's salesperson
- The mistake
- Assigning the sale to the customer's salesperson (res.partner.user_id).
- Why it happens
- The portfolio is not who sold: one's customer is served by another, and the sale moves.
- How we handle it
- Use the document's salesperson: invoice_user_id on the invoice, user_id on the till.
No salesperson
- The mistake
- A document without a salesperson vanishes from the breakdown.
- Why it happens
- The total by salesperson stops matching the company's net sales.
- How we handle it
- Group it under "no salesperson", which counts in the total, and warn how much is there.
Point-of-sale order with an invoice
- The mistake
- Adding the point-of-sale order and the invoice it generated.
- Why it happens
- It is the same sale twice, sometimes with two salespeople.
- How we handle it
- Count it once, through the invoice, with the invoice's salesperson (the net sales rule).
Return
- The mistake
- Taking the return out of the company total and not out of the salesperson.
- Why it happens
- The salesperson of the returned sale keeps a sale that no longer exists.
- How we handle it
- The return comes out of the return's salesperson, which Odoo copies from the original sale.
Where the number comes from
Audit trail
- Odoo model
account.move + pos.order- Fields
account.move.invoice_user_id,account.move.amount_untaxed_signed,pos.order.user_id,pos.order.amount_total,pos.order.amount_tax- Why this path
- The same sources as net sales, so the total by salesperson matches it. The salesperson comes from the document that counts the sale, not from the order or the customer.
How you can adjust it
| Parameter | What it does | Options |
|---|---|---|
| Companies | company ids, always explicit | — |
| Period | {from, to} in local dates or relative; without a period, the last 30 days | — |
| Filters | narrow down by salespeople or customers (lists of ids) | salespeople and customers |
| Group by | the table row: salesperson, or salesperson by month | salesperson and month |
| Sort by | order of the salespeople | amount, name, average ticket, and change |
| Items listed | how many salespeople 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: the sum of salespeople matches net sales for the same period, 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
- Without point of sale, invoices only. With OCA l10n-brazil, the salesperson only shows if the fiscal document has user_id. Does not use read_group.
Need a variation of this metric, or another one that does not exist yet?