aggregate_records
Compute grouped summaries and aggregations on Odoo data with a single server-side call. Sum, average, count, or tally distinct records by any field, skipping the need to download rows.
Instructions
Group and aggregate records server-side (one call instead of pulling rows).
Args: model: Technical model name, e.g. 'sale.order'. group_by: One or more fields to group on. A field may carry a granularity, e.g. 'date_order:month'. measures: 'field:agg' specs. Bare 'field' means sum. Allowed aggregators: sum, avg, min, max, count, count_distinct. Omit to count records. domain: Odoo search domain (list of triplets). Defaults to all records. limit: Max groups (capped by ODOO_MAX_RECORDS). offset: Pagination offset over groups. order: Sort spec, e.g. 'amount_total desc'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| model | Yes | ||
| order | No | ||
| domain | No | ||
| offset | No | ||
| group_by | Yes | ||
| measures | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |