Skip to main content

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

Project description

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 is tested on all major releases of Odoo (starting from 8.0).

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.

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

OdooRPC-0.7.0.tar.gz (57.3 kB view details)

Uploaded Source

Built Distribution

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

OdooRPC-0.7.0-py2.py3-none-any.whl (42.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file OdooRPC-0.7.0.tar.gz.

File metadata

  • Download URL: OdooRPC-0.7.0.tar.gz
  • Upload date:
  • Size: 57.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for OdooRPC-0.7.0.tar.gz
Algorithm Hash digest
SHA256 0de1ea5e27fdf5b45d4f223b72b507f2a4976c64209cf94e93f61fa6618ab598
MD5 65b47fc7b08d1e357b0dce99cd249079
BLAKE2b-256 ae4f281207271e2f2237f40fe91914ef446aa6213d1302abe5bfaafb7e798f2e

See more details on using hashes here.

File details

Details for the file OdooRPC-0.7.0-py2.py3-none-any.whl.

File metadata

  • Download URL: OdooRPC-0.7.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 42.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for OdooRPC-0.7.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2f9f80c05e2623d4900ca8463d07eb6744102b94504467f4201de4c2689b8cfa
MD5 97e2af97639c4d32bc3734f3dab4543e
BLAKE2b-256 c2d39296b7fb785a70894812e4fd0614fe9e8558583635553d741c82e5f19378

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