Standard ORM methods¶
These methods are reported on every model in the runtime snapshot. Odoo 19 JSON-2 calls use named request-body parameters at /json/2/<model>/<method>.
POST {{base_url}}/json/2/res.partner/search_read
Authorization: bearer {{api_key}}
X-Odoo-Database: {{database}}
Content-Type: application/json
{
"domain": [["is_company", "=", true]],
"fields": ["name", "email", "country_id"],
"limit": 20,
"order": "name asc"
}
Public does not mean permitted
The endpoint may expose a method, but access controls, record rules, field groups, validation rules, and business state can still reject a call.
search¶
search(domain, offset=0, limit=None, order=None) -> ids
Search for records matching the domain. Returns record ids.
| Parameter | Type | Purpose |
|---|---|---|
domain |
list |
A search domain. |
offset |
int |
Number of matching records to skip. |
limit |
int|None |
Maximum number of records to return. |
order |
str|None |
Sort expression such as "write_date desc". |
search_count¶
search_count(domain) -> int
Count records matching a domain.
| Parameter | Type | Purpose |
|---|---|---|
domain |
list |
A search domain. |
search_read¶
search_read(domain, fields, offset=0, limit=None, order=None) -> list[dict]
Search and read records in one request.
| Parameter | Type | Purpose |
|---|---|---|
domain |
list |
A search domain. |
fields |
list |
Explicit field names to return. |
offset |
int |
Number of matching records to skip. |
limit |
int|None |
Maximum number of records to return. |
order |
str|None |
Sort expression. |
read¶
read(ids, fields) -> list[dict]
Read fields from specified record ids.
| Parameter | Type | Purpose |
|---|---|---|
ids |
list[int] |
Record ids to read. |
fields |
list |
Explicit field names to return. |
fields_get¶
fields_get(allfields=None, attributes=None) -> dict
Return field definitions visible to the current user.
| Parameter | Type | Purpose |
|---|---|---|
allfields |
list|None |
Optional field-name subset. |
attributes |
list|None |
Optional metadata-attribute subset. |
name_search¶
name_search(name='', args=None, operator='ilike', limit=100) -> list[(id, display_name)]
Search records by display name.
| Parameter | Type | Purpose |
|---|---|---|
name |
str |
Text to match. |
args |
list|None |
Additional search domain. |
operator |
str |
Match operator. |
limit |
int |
Maximum number of matches. |
create¶
create(vals_list) -> ids
Create one or more records.
| Parameter | Type | Purpose |
|---|---|---|
vals_list |
list[dict] |
Values for each new record. |
write¶
write(ids, vals) -> bool
Update specified records.
| Parameter | Type | Purpose |
|---|---|---|
ids |
list[int] |
Record ids to update. |
vals |
dict |
Field values to write. |
unlink¶
unlink(ids) -> bool
Delete specified records when business rules permit it.
| Parameter | Type | Purpose |
|---|---|---|
ids |
list[int] |
Record ids to delete. |
copy¶
copy(id, default=None) -> id
Duplicate a record with optional field overrides.
| Parameter | Type | Purpose |
|---|---|---|
id |
int |
Record id to copy. |
default |
dict|None |
Optional field overrides. |
read_group¶
read_group(domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True) -> list[dict]
Aggregate records by one or more grouping fields.
| Parameter | Type | Purpose |
|---|---|---|
domain |
list |
A search domain. |
fields |
list |
Fields and aggregate functions. |
groupby |
list |
Fields to group by. |
default_get¶
default_get(fields_list) -> dict
Resolve context-, company-, and user-dependent defaults at call time.
| Parameter | Type | Purpose |
|---|---|---|
fields_list |
list |
Field names whose defaults should be resolved. |
Model-specific methods¶
Odoo's introspection models do not enumerate model-specific Python methods. High-value methods verified or required by the Accountify workflows are curated on the relevant model pages with risk and evidence notes. Treat authenticated Odoo /doc as the signature authority before implementation.