Skip to main content

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


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 details)

Uploaded Source

Built Distribution

odoo_runner-0.0.3-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file odoo-runner-0.0.3.tar.gz.

File metadata

  • Download URL: odoo-runner-0.0.3.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for odoo-runner-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d0ba8fb41c69dfb42b1960fed0e4aab8712777b077ab7f23796c1cfc6455277f
MD5 d21c37587d9b5527c3ef1d8ff4e09617
BLAKE2b-256 8493c7ebf8b7ade8ba660ab8383adfc5d27298d276db3bb32c803f43be852312

See more details on using hashes here.

File details

Details for the file odoo_runner-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: odoo_runner-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for odoo_runner-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 efec3b280054ba0ae75687e387a815fae1bb9322f5ec2e76b9ecacf3bf22e012
MD5 63181f229495ff3b4dc981daf57a4ba7
BLAKE2b-256 90dedbda8e3d969d3b425f1a4f47d0921f9852f86567e87f2496f8ceb124a2d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page