Skip to main content

OdooRPC

Latest Version Build Status Supported Python versions License

OdooRPC is a Python package providing an easy way to pilot your Odoo servers through RPC.

Features supported:
  • access to all data model methods (even browse) with an API similar to the server-side API,

  • use named parameters with model methods,

  • user context automatically sent providing support for internationalization,

  • browse records,

  • execute workflows,

  • manage databases,

  • reports downloading,

  • JSON-RPC protocol (SSL supported),

How does it work? See below:

import odoorpc

# Prepare the connection to the server
odoo = odoorpc.ODOO('localhost', port=8069)

# Check available databases
print(odoo.db.list())

# Login
odoo.login('db_name', 'user', 'passwd')

# Current user
user = odoo.env.user
print(user.name)            # name of the user connected
print(user.company_id.name) # the name of its company

# Simple 'raw' query
user_data = odoo.execute('res.users', 'read', [user.id])
print(user_data)

# Use all methods of a model
if 'sale.order' in odoo.env:
    Order = odoo.env['sale.order']
    order_ids = Order.search([])
    for order in Order.browse(order_ids):
        print(order.name)
        products = [line.product_id.name for line in order.order_line]
        print(products)

# Update data through a record
user.name = "Brian Jones"

See the documentation for more details and features.

Supported Odoo server versions

OdooRPC has been tested on Odoo 8.0, 9.0, 10.0 and 11.0. It should work on next versions if Odoo keeps a stable API.

Supported Python versions

OdooRPC support Python 2.7, 3.4, 3.5 and 3.6.

License

This software is made available under the LGPL v3 license.

Generate the documentation

To generate the documentation, you have to install Sphinx documentation generator:

pip install sphinx

Then, you can use the build_doc option of the setup.py:

python setup.py build_doc

The generated documentation will be in the ./doc/build/html directory.

Changes in this version

Consult the CHANGELOG file.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed and welcomed feedback.

Credits

Contributors

Do not contact contributors directly about support or help with technical issues.

Maintainer

Odoo Community Association

This package is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Metadata

Release files for OdooRPC 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OdooRPC 0.6.2
File Size Uploaded Provenance Actions
OdooRPC-0.6.2.tar.gz 53.9 kB Without provenance Details for OdooRPC-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for OdooRPC 0.6.2
File Interpreter ABI Platform Actions
OdooRPC-0.6.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for OdooRPC-0.6.2-py2.py3-none-any.whl

Total release size: 91.5 kB

Release files / OdooRPC-0.6.2.tar.gz

Download URL OdooRPC-0.6.2.tar.gz
Size 53.9 kB
Tags Source
SHA-256 checksum
How to use checksums
10c0911d6c27cd665b6c613ee0a00be1d8183e5b305c44279bc7a7820bcb6189
BLAKE2b-256 checksum
How to use checksums
8dcadb6cc54600c2d9c77838bd8ef64ef43616553fdbc29cf3b0fbfbf4d2f285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

Release files / OdooRPC-0.6.2-py2.py3-none-any.whl

Download URL OdooRPC-0.6.2-py2.py3-none-any.whl
Size 37.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
93e5bd42e6fd4851088b7028c9417a09d0a0edbc5bc95689c543ce50fa02cb6a
BLAKE2b-256 checksum
How to use checksums
a6554d0fd8484e06fa6449d9a12fc002e0bb1c6a65d6b954f992e772519587f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

Security for OdooRPC 0.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page