Simple wrapper for running headless Odoo scripts
Project description
Odoo Runner
Small wrapper for running headless Odoo scripts.
Install
pip install odoo-runner
Example
test.py:
#! /usr/bin/env python
import sys
from odoo_runner import OdooRunner
def start(env):
return env['res.partner'].search_count([])
if __name__ == "__main__":
args = sys.argv[1:]
runner = OdooRunner(args, start)
partner_count = runner.run()
print("Number of partners:", partner_count)
sys.exit(0)
running:
PYTHONPATH=/path/to/odoo/src/ ./test.py -c /path/to/odoo.conf --logfile=''
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
odoo-runner-0.0.2.tar.gz
(38.3 kB
view hashes)
Built Distribution
Close
Hashes for odoo_runner-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ac8ae97080b5f5c3854d7cc870c937dd06174c7e518af98c1f49213b978228f |
|
MD5 | 2c285cbb99232842cb6b775fe866fc0b |
|
BLAKE2b-256 | 0e3da48d986675e8421e14e5a85d4024f650ba008da8f6682901d4a3467e4ce1 |