2
.. i18n: OpenERP Module Descriptor File : __terp__.py
3
.. i18n: ============================================
6
OpenERP Module Descriptor File : __terp__.py
7
============================================
10
.. i18n: -------------
16
.. i18n: In the created module directory, you must add a **__terp__.py** file. This file, which must be in Python format, is responsible to
19
In the created module directory, you must add a **__terp__.py** file. This file, which must be in Python format, is responsible to
21
.. i18n: 1. determine the XML files that will be parsed during the initialization of the server, and also to
22
.. i18n: 2. determine the dependencies of the created module.
25
1. determine the XML files that will be parsed during the initialization of the server, and also to
26
2. determine the dependencies of the created module.
28
.. i18n: This file must contain a Python dictionary with the following values:
31
This file must contain a Python dictionary with the following values:
38
.. i18n: The (Plain English) name of the module.
41
The (Plain English) name of the module.
48
.. i18n: The version of the module.
51
The version of the module.
53
.. i18n: **description**
58
.. i18n: The module description (text).
61
The module description (text).
68
.. i18n: The author of the module.
71
The author of the module.
78
.. i18n: The website of the module.
81
The website of the module.
88
.. i18n: The license of the module (default:GPL-2).
91
The license of the module (default:GPL-2).
98
.. i18n: List of modules on which this module depends. The base module must almost always be in the dependencies because some necessary data for the views, reports, ... are in the base module.
101
List of modules on which this module depends. The base module must almost always be in the dependencies because some necessary data for the views, reports, ... are in the base module.
103
.. i18n: **init_xml**
108
.. i18n: List of .xml files to load when the server is launched with the "--init=module" argument. Filepaths must be relative to the directory where the module is. Open ERP XML File Format is detailed in this section.
111
List of .xml files to load when the server is launched with the "--init=module" argument. Filepaths must be relative to the directory where the module is. Open ERP XML File Format is detailed in this section.
113
.. i18n: **update_xml**
118
.. i18n: List of .xml files to load when the server is launched with the "--update=module" launched. Filepaths must be relative to the directory where the module is. Open ERP XML File Format is detailed in this section.
121
List of .xml files to load when the server is launched with the "--update=module" launched. Filepaths must be relative to the directory where the module is. Open ERP XML File Format is detailed in this section.
123
.. i18n: **installable**
128
.. i18n: True or False. Determines if the module is installable or not.
131
True or False. Determines if the module is installable or not.
138
.. i18n: True or False (default: False). Determines the modules that are installed on the database creation.
141
True or False (default: False). Determines the modules that are installed on the database creation.
150
.. i18n: Here is an example of __terp__.py file for the *product* module:
153
Here is an example of __terp__.py file for the *product* module:
155
.. i18n: .. code-block:: python
158
.. i18n: "name" : "Products & Pricelists",
159
.. i18n: "version" : "1.0",
160
.. i18n: "author" : "Open",
161
.. i18n: "category" : "Generic Modules/Inventory Control",
162
.. i18n: "depends" : ["base", "account"],
163
.. i18n: "init_xml" : [],
164
.. i18n: "demo_xml" : ["product_demo.xml"],
165
.. i18n: "update_xml" : ["product_data.xml","product_report.xml", "product_wizard.xml","product_view.xml", "pricelist_view.xml"],
166
.. i18n: "installable": True,
167
.. i18n: "active": True
171
.. code-block:: python
174
"name" : "Products & Pricelists",
177
"category" : "Generic Modules/Inventory Control",
178
"depends" : ["base", "account"],
180
"demo_xml" : ["product_demo.xml"],
181
"update_xml" : ["product_data.xml","product_report.xml", "product_wizard.xml","product_view.xml", "pricelist_view.xml"],
186
.. i18n: The files that must be placed in init_xml are the ones that relate to the workflow definition, data to load at the installation of the software and the data for the demonstrations.
189
The files that must be placed in init_xml are the ones that relate to the workflow definition, data to load at the installation of the software and the data for the demonstrations.
191
.. i18n: The files in **update_xml** concern: views, reports and wizards.
194
The files in **update_xml** concern: views, reports and wizards.
196
.. i18n: Profile Module
197
.. i18n: --------------
203
.. i18n: The purpose of a profile is to initialize Open ERP with a set of modules directly after the database has been created. A profile is a special kind of module that contains no code, only *dependencies on other modules*.
206
The purpose of a profile is to initialize Open ERP with a set of modules directly after the database has been created. A profile is a special kind of module that contains no code, only *dependencies on other modules*.
208
.. i18n: In order to create a profile, you only have to create a new directory in server/addons (you *should* call this folder profile_modulename), in which you put an *empty* __init__.py file (as every directory Python imports must contain an __init__.py file), and a __terp__.py whose structure is as follows :
211
In order to create a profile, you only have to create a new directory in server/addons (you *should* call this folder profile_modulename), in which you put an *empty* __init__.py file (as every directory Python imports must contain an __init__.py file), and a __terp__.py whose structure is as follows :
213
.. i18n: .. code-block:: python
216
.. i18n: "name":"''Name of the Profile'',
217
.. i18n: "version":"''Version String''",
218
.. i18n: "author":"''Author Name''",
219
.. i18n: "category":"Profile",
220
.. i18n: "depends":[''List of the modules to install with the profile''],
221
.. i18n: "demo_xml":[],
222
.. i18n: "update_xml":[],
223
.. i18n: "active":False,
224
.. i18n: "installable":True,
228
.. code-block:: python
231
"name":"''Name of the Profile'',
232
"version":"''Version String''",
233
"author":"''Author Name''",
234
"category":"Profile",
235
"depends":[''List of the modules to install with the profile''],
249
.. i18n: Here's the code of the file
250
.. i18n: server/bin/addons/profile_manufacturing/__terp__.py, which corresponds to the
251
.. i18n: manufacturing industry profile in Open ERP.
254
Here's the code of the file
255
server/bin/addons/profile_manufacturing/__terp__.py, which corresponds to the
256
manufacturing industry profile in Open ERP.
258
.. i18n: .. code-block:: python
261
.. i18n: "name":"Manufacturing industry profile",
262
.. i18n: "version":"1.0",
263
.. i18n: "author":"Open",
264
.. i18n: "category":"Profile",
265
.. i18n: "depends":["mrp", "crm", "sale", "delivery"],
266
.. i18n: "demo_xml":[],
267
.. i18n: "update_xml":[],
268
.. i18n: "active":False,
269
.. i18n: "installable":True,
273
.. code-block:: python
276
"name":"Manufacturing industry profile",
279
"category":"Profile",
280
"depends":["mrp", "crm", "sale", "delivery"],