Reading your data
aidoo_query, aidoo_read and aidoo_schema: filters, pagination, sorting, schema discovery, and how to phrase a request to get an exact result.
4 min de leituraAtualizado a 7 de agosto de 2026
Esta página ainda não está traduzida para o seu idioma: é apresentada em inglês.
Three tools cover all reading. They are granted by default on a new key and cannot change anything: their binding to Odoo is locked server-side.
aidoo_query
The search tool. It combines a filter and a read in a single Odoo call (search_read).
| Parameter | Role | Default |
|---|---|---|
model | The target Odoo model, sale.order for instance | required |
domain | The filter, in Odoo domain format | required |
fields | The fields to return | default set |
limit | Maximum number of records | 80 |
offset | Number of records to skip | 0 |
order | The sort, date_order desc for instance | model default |
The domain, in plain terms
An Odoo domain is a list of conditions. The assistant builds them for you, but being able to read them helps you check it understood.
[["state", "=", "sale"], ["amount_total", ">", 10000]]Reads as: state equals "confirmed order" and amount above 10,000. Conditions combine with AND by default.
Common operators: =, !=, >, >=, <, <=, ilike (contains, case-insensitive), in, not in, child_of. To combine differently: "&" (AND), "|" (OR), "!" (NOT), placed before the conditions they apply to.
Ask to see the filter
When a result looks off, ask "which filter did you use?". The assistant shows you the exact domain. It is the fastest way to catch a misreading: a forgotten status, a date off by one day.
Pagination: how the assistant knows there is more
Every response carries total_count and has_more. The assistant therefore sees immediately that its page of 80 rows belongs to a set of 1,240, and tells you rather than concluding from a sample.
If you want everything: say so explicitly ("go through all the pages"). If you want a total, do not ask for the list, ask for the total, and the assistant will use aidoo_report, which is far more efficient.
Sorting
My 10 largest orders this year, highest first.
The assistant translates that into order: "amount_total desc" and limit: 10. Without an explicit sort, Odoo applies the model's default order, which is rarely the one you expect.
aidoo_read
Reads records whose identifiers are already known. Parameters: model, ids, fields.
You will never ask for it directly: the assistant uses it as a second step, after finding the records with aidoo_query. Its presence in the log simply signals a targeted read.
aidoo_schema
Discovers the shape of your database, without reading any business data.
- With no argument: the list of accessible models
- With
model: that model's fields, their types, their relations, and the associated hint
What custom fields do we have on the customer record?
This is what lets the assistant work on your Odoo rather than a stock one: your x_* fields, the models added by a vertical module, your custom selections.
The schema is introspected, not guessed
Aidoo reads the real structure on connection, then refreshes it. A field added in Odoo becomes visible after a re-introspection from Odoo connection → Models.
Phrasing a read request well
Name the scope. "The orders" is ambiguous; "the confirmed sales orders" is not.
Bound the period. "This month" is fine in a conversation where the context is clear, but "between 1 and 30 June 2026" leaves no room for doubt.
Say what you want to see. Asking for the useful fields ("with the customer, the date and the amount") avoids an over-broad answer and speeds up the call.
Distinguish list from total. "List me" triggers aidoo_query; "how many" or "what total" triggers aidoo_report. On a large database, the two do not cost the same.
The most common mistakes
An empty result although the data exists
Three causes, in order:
- An overlooked status: quotations are not orders, draft invoices are not validated invoices
- The Odoo account's rights: the user whose API key backs the connection may not see those records
- A multi-company rule: the record belongs to a company that account cannot see
"Model not allowed"
The model is blocked in your Aidoo settings. This is not an Odoo error but a rule you set, see Security & permissions.
Numbers that do not match Odoo
Compare the scopes first: Aidoo returns exactly what the domain asks for. A discrepancy almost always comes from a filter that differs from your Odoo view, currency, company, status, or cancelled lines included.
Ask for the domain used, and compare it with the filters on your Odoo screen.
Next step
- Reports and PDFs: aggregating and producing documents
- Writing to Odoo: moving from consulting to acting