Skip to main content

OERPLib-py3 is a Python module providing an easy way to pilot your OpenERP and Odoo servers through RPC.

Project description

Downloads Latest Version License

OERPLib is a Python module providing an easy way to pilot your OpenERP and Odoo servers through RPC.

This version is forked from the original OERPLib 0.8.4

Features supported:
  • XML-RPC and (legacy) Net-RPC protocols,

  • access to all methods proposed by a model class (even browse) with an API similar to the server-side API,

  • ability to use named parameters with such methods (server >= 6.1),

  • user context automatically sent (server >= 6.1) providing support for internationalization,

  • browse records,

  • execute workflows,

  • manage databases,

  • reports downloading,

  • inspection capabilities (graphical output of relations between models and dependencies between modules, list on_change methods from model views, …).

How does it work? See below:

import oerplib

# Prepare the connection to the server
oerp = oerplib.OERP('localhost', protocol='xmlrpc', port=8069)

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

# Login (the object returned is a browsable record)
user = oerp.login('user', 'passwd', 'db_name')
print(user.name)            # name of the user connected
print(user.company_id.name) # the name of its company

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

# Use all methods of an OSV class
order_obj = oerp.get('sale.order')
order_ids = order_obj.search([])
for order in order_obj.browse(order_ids):
    print(order.name)
    products = [line.product_id.name for line in order.order_line]
    print(products)

# Update data through a browsable record
user.name = "Brian Jones"
oerp.write_record(user)

See the documentation for more details and features.

Installing

If you need install from sources:

python setup.py build_doc python setup.py install

Supported OpenERP/Odoo server versions

OERPLib has been tested on OpenERP server v5.0, v6.0, v6.1, v7.0 and Odoo v8.0. It should work on next versions if Odoo keeps a stable API.

Supported Python versions

OERPLib support Python versions 2.6, 2.7, 3.8

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:

easy_install -U 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.

Bugs or suggestions

Please, feel free to report bugs or suggestions in the Bug Tracker!

Changes in this version

Consult the CHANGELOG.rst file.

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

OERPLib-py3-0.8.6.tar.gz (657.1 kB view details)

Uploaded Source

Built Distribution

OERPLib_py3-0.8.6-py3-none-any.whl (60.2 kB view details)

Uploaded Python 3

File details

Details for the file OERPLib-py3-0.8.6.tar.gz.

File metadata

  • Download URL: OERPLib-py3-0.8.6.tar.gz
  • Upload date:
  • Size: 657.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/24.0 requests/2.21.0 requests-toolbelt/0.8.0 urllib3/1.26.8 tqdm/4.30.0 importlib-metadata/4.10.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for OERPLib-py3-0.8.6.tar.gz
Algorithm Hash digest
SHA256 d52c49304d361585e2436d86af4bc1caa2cc9d0068306b9c50cfa79c8fd74cb2
MD5 f96129771177cb99d9bc91500acd68d4
BLAKE2b-256 cb7c7eb024d05262eddc6649458178a8dec5894fa7fbe873292af916120c2f7f

See more details on using hashes here.

File details

Details for the file OERPLib_py3-0.8.6-py3-none-any.whl.

File metadata

  • Download URL: OERPLib_py3-0.8.6-py3-none-any.whl
  • Upload date:
  • Size: 60.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/24.0 requests/2.21.0 requests-toolbelt/0.8.0 urllib3/1.26.8 tqdm/4.30.0 importlib-metadata/4.10.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for OERPLib_py3-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d654466080c8c0bb06f0df3baa649aa40092da9edd377ab0da5f90d37829d308
MD5 e5c334762fe1f9602703e5c07406b820
BLAKE2b-256 447d72be39384913f88ba791f2208c23cdad071b244de49424e8fb5cb0a6d777

See more details on using hashes here.

Supported by

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