Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

An Odoo launcher that discovers addons automatically

Project Description

Odoo server startup scripts that discover Odoo addons automatically without the need of the --addons-path option. They work by looking at addons in the odoo_addons namespace package.


odoo-autodiscover is for Odoo 8 and 9

As from Odoo 10, autodiscovery is built in Odoo, which looks for addons in all locations of the odoo.addons namespace package, in addition to the explicit –addons-path option.

This is the basic building block to package and distribute Odoo addons using standard python infrastructure (ie setuptools, pip, wheel, and pypi).

The following thin wrappers around official Odoo startup scripts are provided:

  • is the equivalent of
  • openerp-server-autodiscover is the equivalent of openerp-server
  • openerp-gevent-autodiscover is the equivalent of openerp-gevent
  • odoo-server-autodiscover is an alias for openerp-server-autodiscover

These scripts have exactly the same behaviour and options as their official Odoo counterparts, except they look for additional addons by examining all distributions providing the odoo_addons namespace package.

How to install

  • create a virtualenv and make sure you have a recent version of pip (by running pip install -U pip or using
  • install Odoo with the standard Odoo installation procedure
  • make sure Odoo is installed (the following commands must work: python -c "import openerp", and openerp-server, and pip list must show the odoo package)
  • install this package (pip install odoo-autodiscover)

How to use

  • create or install odoo addons in the odoo_addons namespace package possibly with the help of the setuptools-odoo package.
  • run odoo with openerp-server-autodiscover or and notice the addons path is constructued automatically

Complete example

The following commands install Odoo 8.0 nightly, then install base_import_async pulling all required dependencies automatically (ie connector).

It uses pre-built wheel packages for all OCA addons from

# create and activate a virtualenv
virtualenv venv
. ./venv/bin/activate
# install Odoo 8.0 nightly
pip install -r
pip install
# install odoo-autodiscover
pip install odoo-autodiscover
# install base_import_async from
pip install odoo-addon-base_import_async --find-links=
# start odoo

Should you like to have an Odoo shell, simply pip install the module:

pip install odoo-addon-shell --find-links= shell

To view addon packages that are installed in your virtualenv, simply use pip list | grep odoo-addon- (note official addons are part of the odoo package).

Technical note

Since it’s not possible to make openerp.addons a namespace package (because openerp/ contains code), we use a pseudo-package named odoo_addons for the sole purpose of discovering addons installed with setuptools in that namespace. odoo_addons is not intended to be imported as the Odoo import hook will make sure all addons can be imported from openerp.addons as usual.

See for more information about namespace packages.

See to follow progress with making openerp.addons a namespace package, which will hopefully make this package obsolete in the future.



Many thanks to Daniel Reis who cleared the path, and Laurent Mignon who convinced me it was possible to do it using standard Python setup tools and had the idea of the odoo_addons namespace package.


1.0.3 (2016-09-30)

  • odoo-autodiscover is built-in Odoo 10!

1.0.2 (2016-02-06)

  • [IMP] add openerp-gevent-autodiscover, and monkey patch the prefork server to launch that script instead of openerp-gevent.

1.0.1 (2015-12-30)

  • [FIX] more reliable way to discover and import the official script, so it will now work when Odoo is installed from the deb package

1.0.0 (2015-12-28)

  • initial stable release
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
odoo_autodiscover-1.0.3-py27-none-any.whl (9.5 kB) Copy SHA256 Checksum SHA256 py27 Wheel Sep 30, 2016
odoo-autodiscover-1.0.3.tar.gz (8.6 kB) Copy SHA256 Checksum SHA256 Source Sep 30, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting