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

Returns the number of records matching a given domain.

  • Returns: Integer β€” count of matching records.

  • Params: Domain (Odoo-style domain array).


Finds IDs of records matching a given domain.

  • Returns: List[int] β€” IDs of records.

  • Params: Domain (Odoo-style domain array).


πŸ“– read

Reads specific fields from a list of record IDs.

  • Returns: List[Dict] β€” each dict contains field-value pairs.

  • Params: List of record IDs.


πŸ“‹ fields_get

Returns 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

Combines 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

Creates a new record with the provided field values.

  • Returns: int β€” ID of the newly created record.

  • Params: Dict with field-value pairs.


✏️ write

Updates one or more records with new values.

  • Returns: bool β€” true if update succeeded.

  • Params:

    • First element: List of record IDs

    • Second element: Dict of fields to update


Deletes one or more records by ID.

  • Returns: bool β€” true if deletion succeeded.

  • Params: List of record IDs.


πŸ› οΈ call_method

Executes 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, and odoo_instance fields.

  • Some actions require elevated permissions in Odoo; ensure the API key or user has the correct access rights.

  • params and keyword fields may vary per action.

Last updated