Actions
TheODXProxy supports a defined set of actions that map closely to Odoo's standard model methods. Each action is executed via a JSON-RPC 2.0 request using the same endpoint structure.
π§ Supported Actions
Below is a list of all supported actions, along with a brief description of what each one does.
π search_count
search_countReturns the number of records matching a given domain.
Returns:
Integerβ count of matching records.Params: Domain (Odoo-style domain array).
π search
searchFinds IDs of records matching a given domain.
Returns:
List[int]β IDs of records.Params: Domain (Odoo-style domain array).
π read
readReads specific fields from a list of record IDs.
Returns:
List[Dict]β each dict contains field-value pairs.Params: List of record IDs.
π fields_get
fields_getReturns field definitions for the specified model.
Returns:
Dictβ field metadata (labels, types, relations, etc.).Params: Optional list of field names to limit the output.
ππ search_read
search_readCombines search and read into one call β searches records then reads specified fields.
Returns:
List[Dict]β result set with selected fields.Params: Domain (Odoo-style domain array).
β create
createCreates a new record with the provided field values.
Returns:
intβ ID of the newly created record.Params:
Dictwith field-value pairs.
βοΈ write
writeUpdates one or more records with new values.
Returns:
boolβtrueif update succeeded.Params:
First element: List of record IDs
Second element:
Dictof fields to update
β unlink
unlinkDeletes one or more records by ID.
Returns:
boolβtrueif deletion succeeded.Params: List of record IDs.
π οΈ call_method
call_methodExecutes a method on the model or record(s).
Returns: Depends on the method's return.
Params:
First element: Method name (e.g.,
"action_post")Second element (optional): List of record IDs
Third element (optional): Arguments
Fourth element (optional): Keyword arguments
only public method can be called any private method cannot be called.
π Notes
All actions must include the
model_id,action, andodoo_instancefields.Some actions require elevated permissions in Odoo; ensure the API key or user has the correct access rights.
paramsandkeywordfields may vary per action.
Last updated