How it works...

The content in the manifest file is a regular Python dictionary, with keys and values. The example manifest we used contains the most relevant keys:

  • name: This is the title for the module.
  • summary: This is the subtitle with a one-line description.
  • description: This is a long description written in plain text or ReStructuredText (RST) format. It is usually surrounded by triple quotes, and is used in Python to delimit multi-line texts. For an RST quick-start reference, visit http://docutils.sourceforge.net/docs/user/rst/quickstart.html.
  • author: This is a string with the name of the authors. When there is more than one, it is common practice to use a comma to separate their names, but note that it should still be a string, not a Python list.
  • website: This is a URL people should visit to learn more about the module or the authors.
  • category: This is used to organize modules by areas of interest. The list of the standard category names available can be seen at https://github.com/odoo/odoo/blob/12.0/odoo/addons/base/data/ir_module_category_data.xml. However, it's also possible to define other new category names here.
  • version: This is the module's version number. It can be used by the Odoo app store to detect newer versions for installed modules. If the version number does not begin with the Odoo target version (for example, 12.0), it will be automatically added. Nevertheless, it will be more informative if you explicitly state the Odoo target version, for example, by using 12.0.1.0.0 or 12.0.1.0, instead of 1.0.0 or 1.0.
  • depends: This is a list with the technical names of the modules it directly depends on. If your module is not depending on any other add-on module, then you should at least add a base module. Don't forget to include any module defining XML IDs, views, or models that are referenced by this module. That will ensure that they all load in the correct order, avoiding hard-to-debug errors.
  • data: This is a list of relative paths for the data files to load during module installation or upgrade. The paths are relative to the module root directory. Usually, these are XML and CSV files, but it's also possible to have YAML data files. These are discussed in depth in Chapter 7, Module Data.
  • demo: This is the list of relative paths to the files with demonstration data to load. These will only be loaded if the database was created with the Demo Data flag enabled.

The image that is used as the module icon is the PNG file at static/description/icon.png.

Odoo is expected to have significant changes between major versions, so modules that have been built for one major version are not likely to be compatible with the next version without conversion and migration work. Due to this, it's important to be sure about a module's Odoo target version before installing it.
..................Content has been hidden....................

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