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.3.tar.gz
(38.4 kB
view hashes)
Built Distribution
Close
Hashes for odoo_runner-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efec3b280054ba0ae75687e387a815fae1bb9322f5ec2e76b9ecacf3bf22e012 |
|
MD5 | 63181f229495ff3b4dc981daf57a4ba7 |
|
BLAKE2b-256 | 90dedbda8e3d969d3b425f1a4f47d0921f9852f86567e87f2496f8ceb124a2d1 |