Odoo 19 JSON-2: plan the move from XML-RPC and JSON-RPC

The deprecation dates, transaction boundary, and migration checks to understand before moving an Odoo integration to version 19.

Signal

JSON-2 is the new External API introduced in Odoo 19. A client posts to POST /json/2/<model>/<method> and authenticates with a bearer API key. It is not an Odoo 18 feature. [S1]

Odoo 19 marks /xmlrpc, /xmlrpc/2, and /jsonrpc as deprecated, with removal scheduled for Odoo 22 (fall 2028) and Odoo Online 21.1 (winter 2027). The notice does not cover custom controllers declared with type='jsonrpc'. [S2]

The transaction difference that matters

Every JSON-2 call runs in its own SQL transaction: success commits and an error rolls back. Multiple JSON-2 calls cannot be chained into one transaction. When a business invariant spans writes to several models, move the operation into one reviewed server-side method and call that method once. [S3]

Migration checklist

  1. Inventory every client call to common, db, object, execute, or execute_kw.
  2. Read the target database’s dynamic documentation to confirm exposed models, methods, and fields.
  3. Move authentication to bearer API keys and establish the correct Host and X-Odoo-Database headers for the deployment.
  4. Test with the real service identity so ACLs, record rules, and field access remain representative.
  5. Find multi-call sequences that assume atomicity; replace them with one server-side method when all-or-nothing behavior is required.
  6. Run both paths on staging and compare payloads, errors, and side effects before cutover.

Limit

The removal dates above are the schedule published in the Odoo 19 documentation at the retrieval date. An upgrade plan still needs to verify edition, Odoo Online plan, custom controllers, and the destination database’s dynamic documentation. This is a migration signal, not a promise that changing transport alone preserves business behavior.