OdooWiki OCA HUB

Base External System Odoo-rpc

base_external_system_odoorpc folder_open OCA/server-backend open_in_new
Base License: AGPL-3

============================ Base External System OdooRPC

This module adds an external system adapter for connecting to another Odoo instance using the Python odoorpc client (JSON-RPC).

It is built on top of base_external_system and implements a new adapter model:

  • external.system.odoo (System Type: External System RPC)

The adapter supports:

  • Validating required connection parameters (host, port, database, username, password)
  • Optional SSL transport (JSON-RPC over SSL)
  • A context-managed client lifecycle via the base_external_system adapter contract (open client, perform calls, logout/cleanup)

Typical use cases include:

  • Reading data from a legacy Odoo (e.g. Odoo 8/9/10) into a newer Odoo (e.g. Odoo 16)
  • Synchronizations, migrations, or import tools that must query remote models (e.g. stock.production.lot, stock.move, res.partner) via RPC

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Adds a new external system type that lets Odoo connect to another Odoo instance over RPC. Users configure the remote server's database, host, port, credentials and SSL, then test the connection from the form.

This module extends the external system configuration so that one Odoo can talk to another Odoo server using the odoorpc library.

On the external system form, when the system type is set to the new RPC option, two extra fields appear: Database (the remote database name) and SSL (to switch to a secure JSON-RPC connection). The standard remote path field is hidden for this type.

  • Connection settings required: host, port, database, username and password. If any is missing, a validation error is raised.
  • A Test Connection action checks the remote server by looking up the admin user record; it reports success or a detailed failure message.
  • The connection uses JSON-RPC, or JSON-RPC over SSL when the SSL option is enabled.
  • When the connection is closed, the module logs out from the remote server and cleans up the client.

Access to the new adapter model is restricted to the System administrator group. A demo record is provided showing a sample RPC connection to localhost.

This is a technical building block: it does not add menus or reports of its own, but it enables other tools (synchronisation, migration or import jobs) to read data from a remote Odoo instance.

Models and fields (2)
  • external.system · extends an existing modelis_ssl (SSL), db_name (Database)
  • external.system.odoo · new model

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/server-backend.

terminal Installation and usage

OCA documentation · Odoo 16.0

This module requires the Python package odoorpc to be installed in the same environment as your Odoo server.

Install it with pip, for example:

pip install odoorpc

Then install the Odoo module in the Apps menu as usual.

If you run Odoo in Docker or another containerized setup, ensure the dependency is present in the image that runs the Odoo server.

  • Go to Settings → External Systems (menu provided by base_external_system).
  • Create a new record.
  • Set System Type to External System RPC (external.system.odoo).
  • Fill in the connection parameters:
  • Host (e.g. odoo-test.odoo.org)
  • Port (e.g. 443 or 8069)
  • Database name
  • Username
  • Password
  • SSL toggle (if applicable)
  • Save the record.

After saving, the adapter interface record is created automatically by base_external_system and is available via the interface field.

Test connection (UI)

Open an external system record configured with System Type External System RPC and click the Test Connection button.

If successful, the adapter will report success (using the success mechanism provided by base_external_system).

Using the client in code

Use the standard context manager from base_external_system:

system = self.env.ref("your_module.external_system_odoo_remote")
with system.client() as odoo:
    partner_model = odoo.env["res.partner"]
    ids = partner_model.search([("is_company", "=", True)], limit=10)
    data = partner_model.read(ids, ["name"])

The yielded object is an odoorpc.ODOO client instance, so any remote model can be accessed via odoo.env["model.name"].

Legacy helper (optional)

Some projects historically called a helper directly on the adapter record:

odoo = system.interface._connect()

If your adapter keeps that helper for backward compatibility, it returns the same client object as external_get_client().

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.