Skip to content

API Reference parrot_tools.odoo.transport.json2

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.odoo.transport.json2

View source

External JSON-2 transport for Odoo 19+.

Odoo 19 introduced the External JSON-2 API as the replacement for the legacy XML-RPC and JSON-RPC object services. The endpoint shape is:

POST /json/2/<model>/<method>

Unlike execute_kw, JSON-2 accepts only named arguments. This transport keeps the toolkit-facing execute_kw contract but translates the ORM calls used by OdooToolkit into JSON-2 request bodies.

Alias AbstractOdooTransport

Re-exported from parrot_tools.odoo.transport.base.AbstractOdooTransport.

Class Json2Transport

Async transport for Odoo's External JSON-2 API.

Parameter Type Default Description
config OdooConfig

Attributes:

Attribute Type Description
name str
uid int | None

Method Json2Transport.from_config

Build a JSON-2 transport from an :class:OdooConfig.

from_config(config: OdooConfig) -> 'Json2Transport'

Parameter Type Default Description
config OdooConfig

Returns: 'Json2Transport'

Method Json2Transport.authenticate

Validate the bearer API key and cache the current user id when available.

authenticate() -> int

Returns: int

Method Json2Transport.execute_kw

execute_kw(model: str, method: str, args: list[Any] | None = None, kwargs: dict[str, Any] | None = None) -> Any

Parameter Type Default Description
model str
method str
args list[Any] | None None
kwargs dict[str, Any] | None None

Returns: Any

Method Json2Transport.version

version() -> dict[str, Any]

Returns: dict[str, Any]

Method Json2Transport.close

close() -> None

Attribute logger

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally