Updating the add-on modules list
When you add a new module, Odoo is unaware of the new module. In order to list the module in Odoo, you will need to update module list. In this recipe, you will learn how to update the app list.
Getting ready
Start your instance and connect to it using the Administrator account. After doing this, activate developer mode (if you don't know how to activate developer mode, refer to Chapter 1, Installing the Odoo Development Environment).
How to do it…
To update the list of available add-on modules in your instance, you need to perform the following steps:
- Open the Apps menu.
- Click on Update Apps List:
Figure 1.13 – Menu item to update the apps list
- In the dialog, click on the Update button:
Figure 1.14 – Dialog to update the apps list
- At the end of the update, you can click on the Apps entry to see the updated list of available add-on modules. You will need to remove the default filter on Apps in the search box to see all of them.
How it works…
When the Update button is clicked, Odoo will read the add-ons path configuration variable. For each directory in the list, it will look for immediate subdirectories containing an add-on manifest file, which is a file named __manifest__.py
that's stored in the add-on module directory. Odoo reads the manifest, expecting to find a Python dictionary. Unless the manifest contains a key installable
instance set to False
, the add-on module metadata is recorded in the database. If the module was already present, the information is updated. If not, a new record is created. If a previously available add-on module is not found, the record is not deleted from the list.
Note
An updated apps list is only required if you added the new add-on path after initializing the database. If you add the new add-on path to the configuration file before initializing the database, then there will be no need to update the module list manually.
To summarize what we have learned so far, after installing, you can start the Odoo server by using the following command line (if you are using a virtual environment, then you need to activate it first):
python3 odoo-bin -d odoo-test -i base --addons-path=addons --db-filter=odoo-test
Once you run the module, you can access Odoo from http://localhost:8069
.
You can also use a configuration file to run Odoo as follows:
./odoo-bin -c myodoo.cfg
Once you start the Odoo server, you can install/update modules from the App menu.