From aae4d8a013e980f8c211d3a5a0249efdf0e628b3 Mon Sep 17 00:00:00 2001 From: Adrian Torres Date: Mon, 29 Jan 2018 10:59:32 +0100 Subject: [PATCH] [FIX][IMP] doc: document manifest features (#22474) Some manifest features, such as external_dependencies, hooks, etc. were not previously documented, this commit documents these features. Closes #22471 --- doc/reference/module.rst | 45 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/doc/reference/module.rst b/doc/reference/module.rst index d4ce37a1862..c145448d6cc 100644 --- a/doc/reference/module.rst +++ b/doc/reference/module.rst @@ -1,5 +1,3 @@ -:banner: banners/module.jpg - ======= Modules ======= @@ -84,6 +82,49 @@ Available manifest fields are: to ``auto_install``. When both ``sale`` and ``crm`` are installed, it automatically adds CRM campaigns tracking to sale orders without either ``sale`` or ``crm`` being aware of one another +``external_dependencies`` (``dict(key=list(str))``) + A dictionary containing python and/or binary dependencies. + + For python dependencies, the ``python`` key must be defined for this + dictionary and a list of python modules to be imported should be assigned + to it. + + For binary dependencies, the ``bin`` key must be defined for this + dictionary and a list of binary executable names should be assigned to it. + + The module won't be installed if either the python module is not installed + in the host machine or the binary executable is not found within the + host machine's PATH environment variable. +``application`` (``bool``, default: ``False``) + Whether the module should be considered as a fully-fledged application + (``True``) or is just a technical module (``False``) that provides some + extra functionality to an existing application module. +``css`` (``list(str)``) + Specify css files with custom rules to be imported, these files should be + located in ``static/src/css`` inside the module. +``images`` (``list(str)``) + Specify image files to be used by the module. +``installable`` (``bool`` default: ``False``) + Whether a user should be able to install the module from the Web UI or not. +``maintainer`` (``str``) + Person or entity in charge of the maintenance of this module, by default + it is assumed that the author is the maintainer. +``{pre_init, post_init, uninstall}_hook`` (``str``) + Hooks for module installation/uninstallation, their value should be a + string representing the name of a function defined inside the module's + ``__init__.py``. + + ``pre_init_hook`` takes a cursor as its only argument, this function is + executed prior to the module's installation. + + ``post_init_hook`` takes a cursor and a registry as its arguments, this + function is executed right after the module's installation. + + ``uninstall_hook`` takes a cursor and a registry as its arguments, this + function is executed after the module's uninstallation. + + These hooks should only be used when setup/cleanup required for this module + is either extremely difficult or impossible through the api. .. _semantic versioning: http://semver.org .. _existing categories: