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-16.0.0.tar.gz (8.6 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-16.0.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyodoo_rpc_client-16.0.0.tar.gz
  • Upload date:
  • Size: 8.6 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-16.0.0.tar.gz
Algorithm Hash digest
SHA256 2d95e5a0217d002b54459315c02b7756b81296e029b60e0224611d91ea0b543b
MD5 3c139102c107e3f47d32a2b9c4c19db2
BLAKE2b-256 3af922be3b04300d219872499487d2951aefed7fd9d07c0c9dd7294fe69804f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyodoo_rpc_client-16.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 809b9f6982c13e4a7e92fa62ed6704f389272725fb8b5c37a81829a0742346be
MD5 579304cb377806735a6a3f242e1bfcdf
BLAKE2b-256 db32f9da4d827aae9cf77dbf2ab6a6c13be0169be808111791b4648b5174d44d

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