Installing third-party modules
Making new modules available in an Odoo instance so they can be installed is something that newcomers to Odoo frequently find confusing. But it doesn't have to be so, so let's demystify it.
Finding community modules
There are many Odoo modules available on the Internet. The Odoo apps store at apps.odoo.com is a catalogue of modules that can be downloaded and installed on your system. The Odoo Community Association (OCA) coordinates community contributions and maintains quite a few module repositories on GitHub at https://github.com/OCA/ .
To add a module to an Odoo installation, we could just copy it into the addons
directory alongside the official modules. In our case, the addons
directory is at ~/odoo-dev/odoo/addons/
. This might not be the best option for us since our Odoo installation is based on a version-controlled code repository, and we will want to keep it synchronized with the GitHub repository.
Fortunately, we can use additional locations for modules so we can keep our custom modules in a different directory, without having them mixed with the official ones.
As an example, we will download the code from this book, available in GitHub, and make those addon modules available in our Odoo installation.
To get the source code from GitHub, run the following commands:
$ cd ~/odoo-dev $ git clone https://github.com/dreispt/todo_app.git -b 10.0
We used the -b
option to make sure we are downloading the modules for the 10.0 version.
After this, we will have a new /todo_app
directory alongside the /odoo
directory, containing the modules. Now we need to let Odoo know about this new module directory.
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 demo --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.
Updating the apps list
We still need to ask Odoo to update its module list before these new modules are made available for installation.
For this, we need developer mode enabled, since it provides the Update Apps List menu option. It can be found in the Apps top menu.
After updating the modules list, we can confirm the new modules are available for installation. Use the Apps menu option to see the list of local modules. Search for todo
and you should see the new modules made available.
Note that the second App Store menu option displays the module list from Odoo apps store instead of your local modules: