Skip to main content

Odoo RPC client for Odoo versions using XML-RPC/JSON-RPC

Project description

pyodoo-rpc-client (Odoo RPC)

Python client for Odoo XML-RPC object/common services for older Odoo versions and legacy integrations.

Features

  • XML-RPC common + object service support.
  • ORM-like model accessor (client.model("res.partner")).
  • with_context support in model calls.
  • OdooRpcEntity convenience API (save, delete, refresh).
  • Runtime debug behavior (debug=False suppresses/records, debug=True raises).

Installation

pip install pyodoo-rpc-client

Quick Start

from pyodoo_rpc_client import OdooRpcClient

odoo = OdooRpcClient(
    url="https://mycompany.example.com",
    db="mycompany",
    username="api-user@example.com",
    password="...",
    debug=False,
)

partners = odoo.model("res.partner").search_read(
    [["is_company", "=", True]],
    fields=["name", "email"],
)

API Overview

OdooRpcClient

  • OdooRpcClient(url, db, username, password=None, key=None, debug=False, allow_none=True)
  • model(model_name)
  • set_debug(bool)
  • execute_kw(model_name, method, args=None, kwargs=None, debug=None, default=None)

OdooRpcModel

  • set_debug(bool)
  • with_context(dict)
  • common methods: search, read, search_read, create, write, unlink, fields_get

OdooRpcEntity

  • id, exists(), refresh()
  • save(), delete(), get_data(...)

Error Handling

  • debug=False (default): method-safe fallback values are returned and latest error is stored.
  • debug=True: raises OdooRpcError.

Compatibility Notes

  • Intended for pre-JSON-2 Odoo integrations.
  • Odoo 20 deprecates legacy RPC endpoints; for Odoo 19+ prefer pyodoo-client.

Contributing

  • Open Issues for bugs and concrete feature requests.
  • Open Pull Requests for code/docs improvements.
  • For open-ended questions and ideas, use GitHub Discussions (enable in repo settings).
  • See CONTRIBUTING.md for workflow and expectations.

Development

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyodoo_rpc_client-18.0.3.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyodoo_rpc_client-18.0.3-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pyodoo_rpc_client-18.0.3.tar.gz.

File metadata

  • Download URL: pyodoo_rpc_client-18.0.3.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyodoo_rpc_client-18.0.3.tar.gz
Algorithm Hash digest
SHA256 b9d527441b5982d3259eaa5d81a71d80af858755a2f751b7fb810d15ae6c7247
MD5 5ed1fbadbd2a1a3c65441a0ea97be2bd
BLAKE2b-256 d49cc848a69adaa490bd2f735677324c061410e0c261b3a0e2883ec4a6026158

See more details on using hashes here.

File details

Details for the file pyodoo_rpc_client-18.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pyodoo_rpc_client-18.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea721a1fb448e377acdc29c1274b71f1c96f398b8947d0322ea2fabb41025d09
MD5 2c472edd34a8c93b5f2bc208658d85c2
BLAKE2b-256 40b7cb16da6ceffc143dfdc9b902b041bba586bd938b07b1a4651ac159fbb949

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page