Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
0aab81cd
Commit
0aab81cd
authored
10 years ago
by
Xavier Morel
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] doc: move manifest description from backend tutorial to manifest doc
parent
4a4d3a60
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/howtos/backend.rst
+8
-30
8 additions, 30 deletions
doc/howtos/backend.rst
doc/reference/module.rst
+21
-0
21 additions, 0 deletions
doc/reference/module.rst
with
29 additions
and
30 deletions
doc/howtos/backend.rst
+
8
−
30
View file @
0aab81cd
...
...
@@ -74,31 +74,9 @@ option.
most command-line options can also be set using :ref:`a configuration
file <reference/cmdline/config>`
An Odoo module is declared by its :ref:`manifest <reference/module/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 <reference/module/manifest>`.
See the :ref:`manifest documentation <reference/module/manifest>` information
about it.
A module is also a
`Python package <http://docs.python.org/2/tutorial/modules.html#packages>`_
...
...
@@ -110,13 +88,13 @@ might contain::
from . import mymodule
Fortunately, there i
s a mechanism to help
you
set up a
n
module
. The command
``odoo.py`
` has a subcommand :ref:`scaffold
<reference/cmdline/scaffold>` to
create an empty module:
Odoo provide
s a mechanism to help set up a
new
module
, :ref:`odoo.py
<reference/cmdline/server>
` has a subcommand :ref:`scaffold
<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
bunch of standard files for a module. Most of them simply contain commented code
...
...
This diff is collapsed.
Click to expand it.
doc/reference/module.rst
+
21
−
0
View file @
0aab81cd
...
...
@@ -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)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment