Add-on installation

When you install an add-on, Odoo checks its list of available add-ons for an uninstalled add-on with the supplied name. It also checks for the dependencies of that add-on and, if there are any, it will recursively install them before installing the add-on.

The installation process of a single module consists of the following steps:

  1. If there are any, run the add-on preinit hook.
  2. Load the model definitions from the Python source code and update the database structure, if necessary (refer to Chapter 5, Application Models, for details).
  3. Load the data files of the add-on and update the database contents, if necessary (refer to Chapter 7, Module Data, for details).
  4. Install the add-on demo data if demo data has been enabled in the instance.
  5. If there are any, run the add-on postinit hook.
  6. Run a validation of the view definitions of the add-on.
  7. If demo data is enabled and a test is enabled, run the tests of the add-on (refer to Chapter 18, Automated Test Cases, for details).
  8. Update the module state in the database.
  9. Update the translations in the database from the add-on's translations (refer to Chapter 12, Internationalization, for details).
The preinit and postinit hooks are defined in the __manifest__.py file using the pre_init_hook and post_init_hook keys, respectively. These hooks are used to invoke Python functions before and after the installation of an add-on module. To learn more about init hooks, refer to Chapter 4, Creating Odoo Modules.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset