[IMP] doc: move manifest description from backend tutorial to manifest doc
This commit is contained in:
parent
4a4d3a60bb
commit
0aab81cd3a
|
@ -74,31 +74,9 @@ option.
|
||||||
most command-line options can also be set using :ref:`a configuration
|
most command-line options can also be set using :ref:`a configuration
|
||||||
file <reference/cmdline/config>`
|
file <reference/cmdline/config>`
|
||||||
|
|
||||||
An Odoo module is declared by its :ref:`manifest <reference/module/manifest>`. It
|
An Odoo module is declared by its :ref:`manifest <reference/module/manifest>`.
|
||||||
is mandatory and contains a single python dictionary declaring various
|
See the :ref:`manifest documentation <reference/module/manifest>` information
|
||||||
metadata for the module: the module's name and description, list of Odoo
|
about it.
|
||||||
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',
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
A module is also a
|
A module is also a
|
||||||
`Python package <http://docs.python.org/2/tutorial/modules.html#packages>`_
|
`Python package <http://docs.python.org/2/tutorial/modules.html#packages>`_
|
||||||
|
@ -110,13 +88,13 @@ might contain::
|
||||||
|
|
||||||
from . import mymodule
|
from . import mymodule
|
||||||
|
|
||||||
Fortunately, there is a mechanism to help you set up an module. The command
|
Odoo provides a mechanism to help set up a new module, :ref:`odoo.py
|
||||||
``odoo.py`` has a subcommand :ref:`scaffold <reference/cmdline/scaffold>` to
|
<reference/cmdline/server>` has a subcommand :ref:`scaffold
|
||||||
create an empty module:
|
<reference/cmdline/scaffold>` to create an empty module:
|
||||||
|
|
||||||
.. code:: bash
|
.. code-block:: console
|
||||||
|
|
||||||
odoo.py scaffold <module name> <where to put it>
|
$ odoo.py scaffold <module name> <where to put it>
|
||||||
|
|
||||||
The command creates a subdirectory for your module, and automatically creates a
|
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
|
bunch of standard files for a module. Most of them simply contain commented code
|
||||||
|
|
|
@ -15,6 +15,27 @@ and to specify a number of module metadata.
|
||||||
It is a file called ``__openerp__.py`` and contains a single Python
|
It is a file called ``__openerp__.py`` and contains a single Python
|
||||||
dictionary, each dictionary key specifying a module metadatum.
|
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:
|
Available manifest fields are:
|
||||||
|
|
||||||
``name`` (``str``, required)
|
``name`` (``str``, required)
|
||||||
|
|
Loading…
Reference in New Issue