pip install s6r-odoo
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}')
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.
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
This project is licensed under the GNU Lesser General Public License (LGPL) Version 3.
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
This software is maintained by Scalizer.