Configuring the addons path
The addons path is a configuration parameter that lists the directories, which will be searched for addon modules by Odoo when it initializes a new database.
Directories listed in the addons path are expected to contain subdirectories, each of which is an addon module.
Getting ready
This recipe assumes you have an instance ready, with a configuration file generated as described in Chapter 1, Installing the Odoo Development Environment. The source code of Odoo is available in ~/odoo-dev/odoo
, and the configuration file is in ~/odoo-dev/my-instance.cfg
.
How to do it…
To add the directory ~/odoo-dev/local-addons
to the addons path of the instance, follow these steps:
Edit the configuration file for your instance
~/odoo-dev/my-instance.cfg
Locate the line starting with
addons_path =
. By default, it should look like the following:addons_path = ~/odoo-dev/odoo/openerp/addons,~/odoo-dev/odoo/addons
Modify the line by appending a comma followed by the name of the directory...