Python3 oerlib porting
Project description
Overview
OERPLib3 is a Python module providing an easy way to pilot your OpenERP and Odoo servers through RPC.
It is a fork for python3 of OERPLib project by Sébastien Alix who have not participated to development of this module.
Features
Oerplib3 |
Oerplib |
OdooRPC |
XML-RPC protocols |
XML-RPC and (legacy) Net-RPC protocols |
JSON RPC |
Transfer from Odoo >= 6.1 <= 9.0 to Odoo >= 11.0 |
Transfer from Odoo >= 6.1 <= 9.0 to Odoo >= 6.1 <= 9.0 |
Transfer from Odoo >= 10.0 to Odoo >= 10.0 |
access to all methods proposed by a model class (even browse) |
||
ability to use named parameters with such methods (Odoo >= 6.1) |
||
user context automatically sent (Odoo >= 6.1) providing support for internationalization |
||
browse records |
||
execute workflows |
||
manage databases |
||
reports downloading |
||
inspection capabilities |
Usage
This module work exactly like original OERPLib
import oerplib3 as 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)
Getting started
Prerequisites
Zeroincombenze tools requires:
Linux Centos 7/8 or Debian 9/10 or Ubuntu 18/20/22
python 2.7+, some tools require python 3.6+, best python 3.8+
bash 5.0+
Installation
Stable version via Python Package
pip install oerplib3
Current version via Git
cd $HOME [[ ! -d ./tools ]] && git clone https://github.com/zeroincombenze/tools.git cd ./tools ./install_tools.sh -pUT source $HOME/devel/activate_tools
Upgrade
Stable version via Python Package
pip install --upgrade oerplib3
Current version via Git
cd ./tools ./install_tools.sh -pUT source $HOME/devel/activate_tools
ChangeLog History
0.8.5 (2024-08-21)
[FIX] Python 3.10 porting
0.8.4 (2023-05-06)
[FIX] First porting
FAQ
Why this module was forked from OERPlib?
OERPlib runs just with python2 and the author did not migrate package on python3
Why I should use this module? Was it better to use OdooRPC?
OdooRPC runs on python3 but it does not support Odoo xmlrpc protocol. So, if you have to read data from an old Odoo version database, you have to use OERPlib3.
Credits
Copyright
SHS-AV s.r.l. <https://www.shs-av.com/>
Contributors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file oerplib3-0.8.5.tar.gz
.
File metadata
- Download URL: oerplib3-0.8.5.tar.gz
- Upload date:
- Size: 38.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b690f77afe3f3f4618d466447ba5e0d25e0ab49fcbc578bb36e2f940a856d14c |
|
MD5 | 61e8427f0aa2db7b933ac393f5091b13 |
|
BLAKE2b-256 | 42772d74d8ad2dc79b7d97f529b42b0b3eb245535ff5d7e27205f4afd55fb115 |