← Back to team overview

openerp-expert-framework team mailing list archive

Module manifest changes (__openerp__.py)

 

Hi everyone,

Following up to a discussion on Twitter regarding @simahawk's OpenERP bootstrap
templates, it seemed important to summarize the undocumented evolution of the
module manifests, i.e. what you can/should use in the __openerp__.py of your
modules.

Some new keys were added to support new features, while others were changed in
order to simplify the syntax when writing new modules. We kept everything
backwards-compatible and don't plan to stop supporting the older syntax soon
(you'll see that many modules from the standard distribution still use it)

6.0 changes
-----------
- 'data' replaces both 'init_xml' and 'update_xml'. It's more intuitive because
it may contain all kinds of file types (CSV,YAML,XML), and the distinction
between init/update can be done using a <data noupdate="1"/> wrapper.
- 'demo' replaces 'demo_xml', for the same reason (only loaded for demo DBs)
- 'test' was added to load special data files in demo DBs after loading the
'demo' ones. The test transaction is automatically rolled back by default when
all test files have been processed. (cfr --test-* server parameters)
- 'web' (boolean) key was introduced to mark a module that should be copied and
loaded into the web client

6.1 changes
-----------
- new 'js', 'css', 'qweb' sections were added to declare web source files
(should by convention be located in subdirectories under /static/src/)
- 'web' boolean key was dropped, any module may now contain web extensions by
simply having 'js', 'css' or 'qweb' entries, and modules are not transferred to
the web client anymore. Web Client is now embedded in server by default, and
when it's not, web-enabled addons should be copied alongside the core web modules.
- 'active' (boolean) flag was renamed to 'auto_install' to avoid confusion with
the 'active' flag that is found in the OpenERP API to soft-delete a record.
Semantics was changed slightly: an 'auto_install' module is automatically
marked for installation as soon as all its dependent modules are installed. If
it has no dependencies it will be installed when a new DB is created (like 'base')
- 'complexity' (easy|normal|expert) is a new optional field that is displayed
on the module form to give an indication about the module's user-friendliness.
- 'application' (boolean) flag was added to mark the "Apps" modules that should
be featured in the default module installation view (kanban view).
- 'category' can now be set to "Hidden" or a subcategory of "Hidden" to hide
technical/auto_install modules from the module list. A button is displayed in
the module list to show them if the user has the Technical Features group.
- (implicit) you can set a (preferably transparent PNG) module icon by adding a
/static/src/img/icon.png file in your module. Nothing to put in manifest, and
the default is to use the icon.png from the 'base' module. These icons are used
in the module installation dashboard (kanban).

Global changes (all versions)
-----------------------------
Following the introduction of OpenERP Apps, the following metadata may be added
to module manifests (for all versions of OpenERP) to improve the module entry
in OpenERP Apps:
- 'description' may use RST syntax (should contain one main section)
- 'images' (list of paths) may be added to provide illustrative screenshots


This is off the top of my head, hope I haven't forgotten anything important...


PS: We'll be sure to include this in the new technical documentation, I've just
added it to the todo-list. Also, please feel free to improve this list and/or
add it somewhere in the current tech doc, if you have the time.


Follow ups