Odoo RPC client
Project description
s6r-odoo
Installation
pip install s6r-odoo
Usage
from s6r_odoo import OdooConnection
odoo = OdooConnection(url='http://odoo.localhost',
dbname='odoo',
user='admin',
password='admin')
res_partner = odoo.model('res.partner')
partner_ids = res_partner.search([], fields=['name', 'email'])
for partner_id in partner_ids:
print(f'{partner_id.name} : {partner_id.email}')
Testing in local environment
Setup environment
To run the tests locally, first install pytest in your venv
pip install --upgrade pytest pytest-env
# pytest-env is an optional package to handle .env variables
Then from the repository root directory, install the s6r-odoo module in editable mode in your venv:
pip install -e ./
Edit /tests/pytest.ini to setup the tests config file
[pytest]
log_cli=true
log_level=WARNING
;WARNING produces a very nice and readable output, use DEBUG or INFO if you need to catch odoo-configurator logs or test logs
log_format = %(asctime)s %(levelname)s %(message)s
log_date_format = %Y-%m-%d %H:%M:%S
env =
ODOO_V16_PASSWORD=
ODOO_V17_PASSWORD=
ODOO_V18_PASSWORD=
; You need to fill these password env variables
For now, this is where we manage the passwords to access testing Odoo instances.
Run the tests
Go to the /tests directory cd tests, then just run:
pytest
If you are using Pycharm, this article explains in details the configuration: https://pytest-with-eric.com/integrations/pytest-pycharm-integration/#Configuring-PyCharm-for-Pytest-Optional
License
This project is licensed under the GNU Lesser General Public License (LGPL) Version 3.
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
- GitHub Repository: ScalizerOrg/s6r-odoo
Contributors
Maintainer
This software is maintained by Scalizer.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file s6r_odoo-2.2.2.tar.gz.
File metadata
- Download URL: s6r_odoo-2.2.2.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2273cb16a2c41e8675a75b23dbec9ad69357b71dca6d12e3d6c52f1ff2362850
|
|
| MD5 |
187a62c8491cbf3432c6e6e7fc309189
|
|
| BLAKE2b-256 |
3b5af96f9a1abbcdae0124e1a531fccabf40cf8cc2aa9e5e3ce8dda654f02839
|
File details
Details for the file s6r_odoo-2.2.2-py3-none-any.whl.
File metadata
- Download URL: s6r_odoo-2.2.2-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8332580b9e1a65b379d83cb0cba613af3f574b9dfbc6924f116ce8f72ddb1806
|
|
| MD5 |
cc62f8d22b30d0702531d19453cc0708
|
|
| BLAKE2b-256 |
604e649265767247b6fa6ff11e881d38ed8d3900af8b1e54fbfec33bfeae4871
|