Skip to content

korallit/odoo-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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=''

About

Wrapper for running headless Odoo scripts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages