Odoo 11 Development Essentials(Third Edition)
上QQ阅读APP看书,第一时间看更新

Configuring the addons path

The Odoo server has a configuration option called addons_path to set where the server should look for modules. By default, this points to the /addons directory, where the Odoo server is running. We can provide not only one, but a list of directories where modules can be found. This allows us to keep our custom modules in a different directory, without having them mixed with the official addons.

Let's start the server with an addons path that includes our new module directory:

$ cd ~/odoo-dev/odoo
$ ./odoo-bin -d testdb --addons-path="../todo_app,./addons"

If you look closer at the server log, you will notice a line reporting the addons path in use: INFO ? odoo: addons paths: [...]. Confirm that it contains our todo_app directory.