diff --git a/doc/howtos/backend.rst b/doc/howtos/backend.rst index 55e49a4b4c3..0ac7ab8060d 100644 --- a/doc/howtos/backend.rst +++ b/doc/howtos/backend.rst @@ -74,31 +74,9 @@ option. most command-line options can also be set using :ref:`a configuration file ` -An Odoo module is declared by its :ref:`manifest `. It -is mandatory and contains a single python dictionary declaring various -metadata for the module: the module's name and description, list of Odoo -modules required for this one to work properly, references to data files, … - -The manifest's general structure is:: - - { - 'name': "MyModule", - 'version': '1.0', - 'depends': ['base'], - 'author': "Author Name", - 'category': 'Category', - 'description': """ - Description text - """, - # data files always loaded at installation - 'data': [ - 'mymodule_view.xml', - ], - # data files containing optionally loaded demonstration data - 'demo': [ - 'demo_data.xml', - ], - } +An Odoo module is declared by its :ref:`manifest `. +See the :ref:`manifest documentation ` information +about it. A module is also a `Python package `_ @@ -110,13 +88,13 @@ might contain:: from . import mymodule -Fortunately, there is a mechanism to help you set up an module. The command -``odoo.py`` has a subcommand :ref:`scaffold ` to -create an empty module: +Odoo provides a mechanism to help set up a new module, :ref:`odoo.py +` has a subcommand :ref:`scaffold +` to create an empty module: -.. code:: bash +.. code-block:: console - odoo.py scaffold + $ odoo.py scaffold The command creates a subdirectory for your module, and automatically creates a bunch of standard files for a module. Most of them simply contain commented code diff --git a/doc/reference/module.rst b/doc/reference/module.rst index 14e7847f1da..5dd93ca2cf6 100644 --- a/doc/reference/module.rst +++ b/doc/reference/module.rst @@ -15,6 +15,27 @@ and to specify a number of module metadata. It is a file called ``__openerp__.py`` and contains a single Python dictionary, each dictionary key specifying a module metadatum. +:: + + { + 'name': "A Module", + 'version': '1.0', + 'depends': ['base'], + 'author': "Author Name", + 'category': 'Category', + 'description': """ + Description text + """, + # data files always loaded at installation + 'data': [ + 'mymodule_view.xml', + ], + # data files containing optionally loaded demonstration data + 'demo': [ + 'demo_data.xml', + ], + } + Available manifest fields are: ``name`` (``str``, required)