search_read
Search and read Odoo records in a single call by specifying model, domain, and fields. Automatically handles multi-company data and avoids common pitfalls like mixing invoice types or summing amounts in wrong currencies.
Instructions
Search and read records in one call (Odoo search_read).
Two pitfalls this tool cannot fix for you:
account.moveandaccount.move.linemix customer invoices, vendor bills, credit notes and raw journal entries. A domain withoutmove_typeis refused — add["move_type", "=", "out_invoice"](orin_invoice,out_refund,in_refund) so the answer matches what the user sees on screen.NEVER sum
amount_total: it is expressed in each record's own currency, and eight foreign-currency invoices once inflated a total 11,9×. Ask foramount_total_signedinstead — any field with a_signedtwin is stored in company currency, and the twin is the one to add up.
Args: model: Odoo model, e.g. "sale.order". domain: Odoo domain, e.g. [["state", "=", "sale"]]. fields: Field names to return. Name them: the default asks for every field, which is slow and can fail to serialise on wide models. limit: Rows to return. Hard-capped at 200. offset: Rows to skip — how to page past a truncated result. company_ids: Companies to read from, e.g. [1, 2]. On a multi-company instance, omitting this reports one company as the whole business.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| model | Yes | ||
| domain | Yes | ||
| fields | No | ||
| offset | No | ||
| company_ids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |