Skip to main content

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

Project description

Downloads Latest Version Build Status Supported Python versions License

OdooRPC is a Python module 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
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 server 8.0. It should work on next versions if Odoo keeps a stable API.

Supported Python versions

OdooRPC support Python 2.7, 3.2, 3.3 and 3.4.

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 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

OdooRPC-0.2.0.tar.gz (50.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: OdooRPC-0.2.0.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for OdooRPC-0.2.0.tar.gz
Algorithm Hash digest
SHA256 aac800041abcbe17bb3b8c5e8c68a2fe31feaa638ad42c0279b6403f28a59038
MD5 eab1402d8fa4af7af0cf90dc979b53bb
BLAKE2b-256 d3afcf1ec62a4a1a5e2d9c7a75c24a3cf5f9769951f7ad0b54b092b3f0af7e2c

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