Skip to content

Commit 911f7b2

Browse files
author
Ivan Yelizariev
committed
[REF] move templates to separate files and include them via literalinclude
It allows to use them in script to make skeleton
1 parent 9cfe7af commit 911f7b2

File tree

6 files changed

+79
-83
lines changed

6 files changed

+79
-83
lines changed

docs/dev/docs/__manifest__.py.rst

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,49 +24,7 @@ Use example below as template. What are important here:
2424
* comma after last item in list (e.g. in 'depends' attribute)
2525
* add new line symbol at the end of file (i.e. right after last ``}``)
2626

27-
.. code-block:: python
28-
29-
# -*- coding: utf-8 -*-
30-
{
31-
"name": """{MODULE_NAME}""",
32-
"summary": """{SHORT_DESCRIPTION_OF_THE_MODULE}""",
33-
"category": "{SOME_CATEGORY}",
34-
# "live_test_url": "",
35-
"images": [],
36-
"version": "1.0.0",
37-
"application": False,
38-
39-
"author": "IT-Projects LLC, {DEVELOPER_NAME}",
40-
"support": "[email protected]",
41-
"website": "https://it-projects.info/team/{DEVELOPER_GITHUB_USERNAME}",
42-
"license": "LGPL-3",
43-
# "price": 9.00,
44-
# "currency": "EUR",
45-
46-
"depends": [
47-
"{DEPENDENCY1}",
48-
"{DEPENDENCY2}",
49-
],
50-
"external_dependencies": {"python": [], "bin": []},
51-
"data": [
52-
"{FILE1}.xml",
53-
"{FILE2}.xml",
54-
],
55-
"qweb": [
56-
"static/src/xml/{QWEBFILE1}.xml",
57-
],
58-
"demo": [
59-
"demo/{DEMOFILE1}.xml",
60-
],
61-
62-
"post_load": None,
63-
"pre_init_hook": None,
64-
"post_init_hook": None,
65-
66-
"auto_install": False,
67-
"installable": True,
68-
}
69-
27+
.. literalinclude:: templates/__manifest__.py
7028

7129
.. image:: ../../images/__openerp__.py-no-new-line-at-the-end-of-file.png
7230

docs/dev/docs/changelog.rst.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ Template
66

77
Use this for new modules
88

9-
.. code-block:: rst
10-
11-
`1.0.0`
12-
-------
13-
14-
- Init version
9+
.. literalinclude:: templates/doc/changelog.rst
1510

1611
Guidlines
1712
---------
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# -*- coding: utf-8 -*-
2+
{
3+
"name": """{MODULE_NAME}""",
4+
"summary": """{SHORT_DESCRIPTION_OF_THE_MODULE}""",
5+
"category": "{SOME_CATEGORY}",
6+
# "live_test_url": "",
7+
"images": [],
8+
"version": "1.0.0",
9+
"application": False,
10+
11+
"author": "IT-Projects LLC, {DEVELOPER_NAME}",
12+
"support": "[email protected]",
13+
"website": "https://it-projects.info/team/{DEVELOPER_GITHUB_USERNAME}",
14+
"license": "LGPL-3",
15+
# "price": 9.00,
16+
# "currency": "EUR",
17+
18+
"depends": [
19+
"{DEPENDENCY1}",
20+
"{DEPENDENCY2}",
21+
],
22+
"external_dependencies": {"python": [], "bin": []},
23+
"data": [
24+
"{FILE1}.xml",
25+
"{FILE2}.xml",
26+
],
27+
"qweb": [
28+
"static/src/xml/{QWEBFILE1}.xml",
29+
],
30+
"demo": [
31+
"demo/{DEMOFILE1}.xml",
32+
],
33+
34+
"post_load": None,
35+
"pre_init_hook": None,
36+
"post_init_hook": None,
37+
38+
"auto_install": False,
39+
"installable": True,
40+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
`1.0.0`
2+
-------
3+
4+
- Init version

docs/dev/docs/templates/doc/index.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
===============
2+
{Module name}
3+
===============
4+
5+
Installation
6+
============
7+
8+
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way
9+
* {OPTIONAL }`Activate longpolling <https://odoo-development.readthedocs.io/en/latest/admin/longpolling.html>`__
10+
* {Additional notes if any}
11+
12+
Configuration
13+
=============
14+
15+
{Instruction how to configure the module.}
16+
17+
* `Enable technical features <https://odoo-development.readthedocs.io/en/latest/odoo/usage/technical-features.html>`__
18+
* Open menu ``{Menu} >> {Submenu} >> {Subsubmenu}``
19+
* Click ``[{Button Name}]``
20+
21+
Usage
22+
=====
23+
24+
{Instruction for daily usage. It should describe how to check that module works. What shall user do and what would user get.}
25+
* Open menu ``{Menu} >> {Submenu} >> {Subsubmenu}``
26+
* Click ``[{Button Name}]``
27+
* RESULT: {what user gets, how the modules changes default behaviour}
28+
29+
Uninstallation
30+
==============
31+
32+
{Optional section for uninstallation notes. Delete it if you don't have notes for uninstallation.}

docs/dev/docs/usage-instructions.rst

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,7 @@
22
doc/index.rst
33
===============
44

5-
::
6-
7-
===============
8-
{Module name}
9-
===============
10-
11-
Installation
12-
============
13-
14-
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way
15-
* {OPTIONAL }`Activate longpolling <https://odoo-development.readthedocs.io/en/latest/admin/longpolling.html>`__
16-
* {Additional notes if any}
17-
18-
Configuration
19-
=============
20-
21-
{Instruction how to configure the module.}
22-
23-
* `Enable technical features <https://odoo-development.readthedocs.io/en/latest/odoo/usage/technical-features.html>`__
24-
* Open menu ``{Menu} >> {Submenu} >> {Subsubmenu}``
25-
  * Click ``[{Button Name}]``
26-
27-
Usage
28-
=====
29-
30-
{Instruction for daily usage. It should describe how to check that module works. What shall user do and what would user get.}
31-
* Open menu ``{Menu} >> {Submenu} >> {Subsubmenu}``
32-
  * Click ``[{Button Name}]``
33-
  * RESULT: {what user gets, how the modules changes default behaviour}
34-
35-
Uninstallation
36-
==============
37-
38-
{Optional section for uninstallation notes. Delete it if you don't have notes for uninstallation.}
5+
.. literalinclude:: templates/doc/index.rst
396

407
This description will be available at app store under *Documentation* tab. Example: https://www.odoo.com/apps/modules/8.0/pos_multi_session/
418

0 commit comments

Comments
 (0)