~openerp-chinese-team/openobject-doc/Chinese-init

« back to all changes in this revision

Viewing changes to i18n/zh_CN/source/contribute/05_developing_modules.rst

  • Committer: JoshuaJan
  • Date: 2012-12-04 01:36:44 UTC
  • Revision ID: popkar77@gmail.com-20121204013644-k25kpyac672wxe22
Chinese initialization

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
.. i18n: Developing modules
 
3
.. i18n: -------------------
 
4
..
 
5
 
 
6
Developing modules
 
7
-------------------
 
8
 
 
9
.. i18n: .. index::
 
10
.. i18n:    single: modules development
 
11
.. i18n: ..
 
12
..
 
13
 
 
14
.. index::
 
15
   single: modules development
 
16
..
 
17
 
 
18
.. i18n: Introduction
 
19
.. i18n: ++++++++++++
 
20
..
 
21
 
 
22
Introduction
 
23
++++++++++++
 
24
 
 
25
.. i18n: Here you will find information about the organisation of the community in
 
26
.. i18n: OpenERP project. It includes a description of the different tools used, the role
 
27
.. i18n: of the different actors, and the different process for improvement management.
 
28
..
 
29
 
 
30
Here you will find information about the organisation of the community in
 
31
OpenERP project. It includes a description of the different tools used, the role
 
32
of the different actors, and the different process for improvement management.
 
33
 
 
34
.. i18n: The whole organisation is managed through our launchpad projects: http://launchpad.net
 
35
.. i18n: Our projects on launchpad are currently organised like this:
 
36
..
 
37
 
 
38
The whole organisation is managed through our launchpad projects: http://launchpad.net
 
39
Our projects on launchpad are currently organised like this:
 
40
 
 
41
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
42
.. i18n: | **Project name**           | **URL**                                      | **Description**                            |
 
43
.. i18n: +============================+==============================================+============================================+
 
44
.. i18n: |                            |                                              |                                            |
 
45
.. i18n: | **openobject**             | https://launchpad.net/openobject             | the main super-project (group) where all   |
 
46
.. i18n: |                            |                                              | bugs, features and faq are managed         |
 
47
.. i18n: |                            |                                              |                                            |
 
48
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
49
.. i18n: |                            |                                              |                                            |
 
50
.. i18n: | **openobject-addons**      | https://launchpad.net/openobject-addons      | the project for core OpenERP modules       |
 
51
.. i18n: |                            |                                              |                                            |
 
52
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
53
.. i18n: |                            |                                              |                                            |
 
54
.. i18n: | **openobject-server**      | https://launchpad.net/openobject-server      | the OpenERP server                         |
 
55
.. i18n: |                            |                                              |                                            |
 
56
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
57
.. i18n: |                            |                                              |                                            |
 
58
.. i18n: | **openerp-web**            | https://launchpad.net/openerp-web            | the web client for OpenERP 6.1 and newer   |
 
59
.. i18n: |                            |                                              | versions                                   |
 
60
.. i18n: |                            |                                              |                                            |
 
61
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
62
.. i18n: |                            |                                              |                                            |
 
63
.. i18n: | **openobject-client**      | https://launchpad.net/openobject-client      | the native client (gtk) for OpenERP 6.1    |
 
64
.. i18n: |                            |                                              | and earlier                                |
 
65
.. i18n: |                            |                                              |                                            |
 
66
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
67
.. i18n: |                            |                                              |                                            |
 
68
.. i18n: | **openobject-client-web**  | https://launchpad.net/openobject-client-web  | the web client for OpenERP 6.0 and earlier |
 
69
.. i18n: |                            |                                              | versions                                   |
 
70
.. i18n: |                            |                                              |                                            |
 
71
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
72
..
 
73
 
 
74
+----------------------------+----------------------------------------------+--------------------------------------------+
 
75
| **Project name**           | **URL**                                      | **Description**                            |
 
76
+============================+==============================================+============================================+
 
77
|                            |                                              |                                            |
 
78
| **openobject**             | https://launchpad.net/openobject             | the main super-project (group) where all   |
 
79
|                            |                                              | bugs, features and faq are managed         |
 
80
|                            |                                              |                                            |
 
81
+----------------------------+----------------------------------------------+--------------------------------------------+
 
82
|                            |                                              |                                            |
 
83
| **openobject-addons**      | https://launchpad.net/openobject-addons      | the project for core OpenERP modules       |
 
84
|                            |                                              |                                            |
 
85
+----------------------------+----------------------------------------------+--------------------------------------------+
 
86
|                            |                                              |                                            |
 
87
| **openobject-server**      | https://launchpad.net/openobject-server      | the OpenERP server                         |
 
88
|                            |                                              |                                            |
 
89
+----------------------------+----------------------------------------------+--------------------------------------------+
 
90
|                            |                                              |                                            |
 
91
| **openerp-web**            | https://launchpad.net/openerp-web            | the web client for OpenERP 6.1 and newer   |
 
92
|                            |                                              | versions                                   |
 
93
|                            |                                              |                                            |
 
94
+----------------------------+----------------------------------------------+--------------------------------------------+
 
95
|                            |                                              |                                            |
 
96
| **openobject-client**      | https://launchpad.net/openobject-client      | the native client (gtk) for OpenERP 6.1    |
 
97
|                            |                                              | and earlier                                |
 
98
|                            |                                              |                                            |
 
99
+----------------------------+----------------------------------------------+--------------------------------------------+
 
100
|                            |                                              |                                            |
 
101
| **openobject-client-web**  | https://launchpad.net/openobject-client-web  | the web client for OpenERP 6.0 and earlier |
 
102
|                            |                                              | versions                                   |
 
103
|                            |                                              |                                            |
 
104
+----------------------------+----------------------------------------------+--------------------------------------------+
 
105
 
 
106
.. i18n: Getting Sources
 
107
.. i18n: +++++++++++++++
 
108
..
 
109
 
 
110
Getting Sources
 
111
+++++++++++++++
 
112
 
 
113
.. i18n: Please refer to :ref:`how-to-get-the-latest-trunk-source-code-link` in the Bazaar section
 
114
..
 
115
 
 
116
Please refer to :ref:`how-to-get-the-latest-trunk-source-code-link` in the Bazaar section
 
117
 
 
118
.. i18n: If you don't know the Bazaar version control system, please read the :ref:`documentation on Bazaar <bazaar-link>`
 
119
..
 
120
 
 
121
If you don't know the Bazaar version control system, please read the :ref:`documentation on Bazaar <bazaar-link>`
 
122
 
 
123
.. i18n: Community Addons
 
124
.. i18n: ++++++++++++++++
 
125
..
 
126
 
 
127
Community Addons
 
128
++++++++++++++++
 
129
 
 
130
.. i18n: OpenERP modules developed by the community were historically published in a shared source
 
131
.. i18n: code branch on Launchpad, nicknamed ``extra-addons``: https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-extra-addons
 
132
..
 
133
 
 
134
OpenERP modules developed by the community were historically published in a shared source
 
135
code branch on Launchpad, nicknamed ``extra-addons``: https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-extra-addons
 
136
 
 
137
.. i18n: As of 2012 and the release of OpenERP 6.1, this shared branch is being phased out, due to several downsides to this
 
138
.. i18n: organization, such as:
 
139
..
 
140
 
 
141
As of 2012 and the release of OpenERP 6.1, this shared branch is being phased out, due to several downsides to this
 
142
organization, such as:
 
143
 
 
144
.. i18n:  * difficult to enforce access control on the modules (commit right is all or nothing)
 
145
.. i18n:  * difficult to enforce quality (therefore impossible to rely on it for customer projects)
 
146
.. i18n:  * commit history mixes all modules
 
147
.. i18n:  * download/checkout of the branch requires to fetch all modules at once
 
148
..
 
149
 
 
150
 * difficult to enforce access control on the modules (commit right is all or nothing)
 
151
 * difficult to enforce quality (therefore impossible to rely on it for customer projects)
 
152
 * commit history mixes all modules
 
153
 * download/checkout of the branch requires to fetch all modules at once
 
154
 
 
155
.. i18n: A better organization was discussed on the OpenERP `mailing-lists <https://lists.launchpad.net/openerp-expert-framework/msg00948.html>`_,
 
156
.. i18n: with the `following goals <https://lists.launchpad.net/openerp-expert-framework/msg00997.html>`_:
 
157
..
 
158
 
 
159
A better organization was discussed on the OpenERP `mailing-lists <https://lists.launchpad.net/openerp-expert-framework/msg00948.html>`_,
 
160
with the `following goals <https://lists.launchpad.net/openerp-expert-framework/msg00997.html>`_:
 
161
 
 
162
.. i18n:  * To get rid of the big extra-addons branch
 
163
.. i18n:  * To join efforts on the same topic in order to avoid too many modules for a same feature
 
164
.. i18n:  * To become more aware of the developments that have been done by others
 
165
.. i18n:  * To start working with merge proposal between us
 
166
.. i18n:  * To improve the quality of our code
 
167
..
 
168
 
 
169
 * To get rid of the big extra-addons branch
 
170
 * To join efforts on the same topic in order to avoid too many modules for a same feature
 
171
 * To become more aware of the developments that have been done by others
 
172
 * To start working with merge proposal between us
 
173
 * To improve the quality of our code
 
174
 
 
175
.. i18n: The community modules have therefore been split into separate Launchpad project and
 
176
.. i18n: their respective branches. When possible, existing ones were reused. All listed projects
 
177
.. i18n: provide a short description of the kind of modules you can find/merge into.
 
178
..
 
179
 
 
180
The community modules have therefore been split into separate Launchpad project and
 
181
their respective branches. When possible, existing ones were reused. All listed projects
 
182
provide a short description of the kind of modules you can find/merge into.
 
183
 
 
184
.. i18n: The community welcomes everyone on board to join efforts! In order to add your own modules in the appropriate project,
 
185
.. i18n: you should use merge proposals. Depending on the volume, some time might be needed at the beginning to review everything.
 
186
.. i18n: So thank you all in advance for your patience during this transition period.
 
187
..
 
188
 
 
189
The community welcomes everyone on board to join efforts! In order to add your own modules in the appropriate project,
 
190
you should use merge proposals. Depending on the volume, some time might be needed at the beginning to review everything.
 
191
So thank you all in advance for your patience during this transition period.
 
192
 
 
193
.. i18n: For all of these projects, the rules we expect you to adhere to and respect are:
 
194
..
 
195
 
 
196
For all of these projects, the rules we expect you to adhere to and respect are:
 
197
 
 
198
.. i18n:  * No company-related prefix or suffix in the module names (like ``c2c-account-something``);
 
199
.. i18n:  * Always make merge proposal for any bugfix or improvement so that everyone can take note of it and eventually ask for a different approach;
 
200
.. i18n:  * Nobody merge his/her own work into the branch. Another member of the team must do it. Exceptions may be accepted if the merge proposal has been strongly approved by the rest of the team;
 
201
.. i18n:  * If your module doesn’t fit into any of the available projects, or you found no related team, please post a request on the `framework expert mailing list <https://launchpad.net/~openerp-expert-framework>`_ so that we can create a specific one for you;
 
202
.. i18n:  * When at least one of your modules has been approved in the branch, you may ask to be part of the team. If you are not part of the team, you can still contribute to the project through merge proposals;
 
203
.. i18n:  * Use the available teams (see :ref:`community_contrib_teams` section) according to their topics (it means that you always need to attribute a new project to these teams, so as to avoid having hundreds of them).
 
204
..
 
205
 
 
206
 * No company-related prefix or suffix in the module names (like ``c2c-account-something``);
 
207
 * Always make merge proposal for any bugfix or improvement so that everyone can take note of it and eventually ask for a different approach;
 
208
 * Nobody merge his/her own work into the branch. Another member of the team must do it. Exceptions may be accepted if the merge proposal has been strongly approved by the rest of the team;
 
209
 * If your module doesn’t fit into any of the available projects, or you found no related team, please post a request on the `framework expert mailing list <https://launchpad.net/~openerp-expert-framework>`_ so that we can create a specific one for you;
 
210
 * When at least one of your modules has been approved in the branch, you may ask to be part of the team. If you are not part of the team, you can still contribute to the project through merge proposals;
 
211
 * Use the available teams (see :ref:`community_contrib_teams` section) according to their topics (it means that you always need to attribute a new project to these teams, so as to avoid having hundreds of them).
 
212
 
 
213
.. i18n: Should you have any suggestions related to the above rules, please feel free to post them on the framework expert mailing list.
 
214
..
 
215
 
 
216
Should you have any suggestions related to the above rules, please feel free to post them on the framework expert mailing list.
 
217
 
 
218
.. i18n: Community Projects
 
219
.. i18n: ^^^^^^^^^^^^^^^^^^
 
220
.. i18n: The list of the official community projects/topics can be found under this project group: https://launchpad.net/openobject,
 
221
.. i18n: and is summarized below.
 
222
..
 
223
 
 
224
Community Projects
 
225
^^^^^^^^^^^^^^^^^^
 
226
The list of the official community projects/topics can be found under this project group: https://launchpad.net/openobject,
 
227
and is summarized below.
 
228
 
 
229
.. i18n:  * Stock and Logistic Barcode: https://launchpad.net/stock-logistic-barcode
 
230
.. i18n:  * Stock and Logistic Warehouse: https://launchpad.net/stock-logistic-warehouse
 
231
.. i18n:  * Stock and Logistic Tracking: https://launchpad.net/stock-logistic-tracking
 
232
.. i18n:  * Stock and Logistic Flows: https://launchpad.net/stock-logistic-flows
 
233
.. i18n:  * Stock and Logistic - Reports: https://launchpad.net/stock-logistic-report
 
234
.. i18n:  * Carriers And Deliveries Management: https://launchpad.net/carriers-deliveries
 
235
.. i18n:  * Banking Addons: https://launchpad.net/banking-addons
 
236
.. i18n:  * Contact and Partner Management: https://launchpad.net/partner-contact-management
 
237
.. i18n:  * Purchase - Workflow and Organization: https://launchpad.net/purchase-wkfl
 
238
.. i18n:  * Purchase - Financial Controlling: https://launchpad.net/purchase-financial
 
239
.. i18n:  * Purchase - Reports: https://launchpad.net/purchase-report
 
240
.. i18n:  * Sales - Financial Controlling: https://launchpad.net/sale-financial
 
241
.. i18n:  * Sales - Workflow and Organization: https://launchpad.net/sale-wkfl
 
242
.. i18n:  * Sales - Reports: https://launchpad.net/sale-reports
 
243
.. i18n:  * Product - Kitting Management: https://launchpad.net/product-kitting
 
244
.. i18n:  * OpenERP Product Attributes : https://launchpad.net/openerp-product-attributes
 
245
.. i18n:  * Account - Financial Report: https://launchpad.net/account-financial-report
 
246
.. i18n:  * Account - Analytic Accounting: https://launchpad.net/account-analytic
 
247
.. i18n:  * Account - Budgeting: https://launchpad.net/account-budgeting
 
248
.. i18n:  * Account - Invoicing Reports: https://launchpad.net/account-invoice-report
 
249
.. i18n:  * Account Payment Addons: https://launchpad.net/account-payment
 
250
.. i18n:  * Account - Closing: https://launchpad.net/account-closing
 
251
.. i18n:  * Account - Consolidation: https://launchpad.net/account-consolidation
 
252
.. i18n:  * Account - Financial Tools: https://launchpad.net/account-financial-tools
 
253
.. i18n:  * Account - Invoicing: https://launchpad.net/account-invoicing
 
254
.. i18n:  * Contract management: https://launchpad.net/contract-management
 
255
.. i18n:  * OpenERP Fiscal Rule: https://launchpad.net/openerp-fiscal-rules
 
256
.. i18n:  * Margin Analysis: https://launchpad.net/margin-analysis
 
257
.. i18n:  * Medical in OpenERP : https://launchpad.net/oemedical
 
258
.. i18n:  * Construction : https://launchpad.net/openerp-construction
 
259
.. i18n:  * Project Management - Invoicing and Reporting: https://launchpad.net/project-reporting
 
260
.. i18n:  * Project Management - Services: https://launchpad.net/project-service
 
261
.. i18n:  * HR - Timesheet Management: https://launchpad.net/hr-timesheet
 
262
.. i18n:  * Hotel Management System on OpenERP : https://launchpad.net/hotel-management-system
 
263
.. i18n:  * Department Management: https://launchpad.net/department-mgmt
 
264
.. i18n:  * Server Environment And Tools: https://launchpad.net/server-env-tools
 
265
.. i18n:  * Webkit Utils: https://launchpad.net/webkit-utils
 
266
.. i18n:  * E-Commerce addons: https://launchpad.net/e-commerce-addons
 
267
.. i18n:  * Report - Printing and Sending: https://launchpad.net/report-print-send
 
268
.. i18n:  * Management Systems : https://launchpad.net/openerp-mgmtsystem
 
269
.. i18n:  * Web-Addons for OpenERP : https://launchpad.net/web-addons
 
270
.. i18n:  * Geospatial Addons for OpenERP : https://launchpad.net/geospatial-addons
 
271
..
 
272
 
 
273
 * Stock and Logistic Barcode: https://launchpad.net/stock-logistic-barcode
 
274
 * Stock and Logistic Warehouse: https://launchpad.net/stock-logistic-warehouse
 
275
 * Stock and Logistic Tracking: https://launchpad.net/stock-logistic-tracking
 
276
 * Stock and Logistic Flows: https://launchpad.net/stock-logistic-flows
 
277
 * Stock and Logistic - Reports: https://launchpad.net/stock-logistic-report
 
278
 * Carriers And Deliveries Management: https://launchpad.net/carriers-deliveries
 
279
 * Banking Addons: https://launchpad.net/banking-addons
 
280
 * Contact and Partner Management: https://launchpad.net/partner-contact-management
 
281
 * Purchase - Workflow and Organization: https://launchpad.net/purchase-wkfl
 
282
 * Purchase - Financial Controlling: https://launchpad.net/purchase-financial
 
283
 * Purchase - Reports: https://launchpad.net/purchase-report
 
284
 * Sales - Financial Controlling: https://launchpad.net/sale-financial
 
285
 * Sales - Workflow and Organization: https://launchpad.net/sale-wkfl
 
286
 * Sales - Reports: https://launchpad.net/sale-reports
 
287
 * Product - Kitting Management: https://launchpad.net/product-kitting
 
288
 * OpenERP Product Attributes : https://launchpad.net/openerp-product-attributes
 
289
 * Account - Financial Report: https://launchpad.net/account-financial-report
 
290
 * Account - Analytic Accounting: https://launchpad.net/account-analytic
 
291
 * Account - Budgeting: https://launchpad.net/account-budgeting
 
292
 * Account - Invoicing Reports: https://launchpad.net/account-invoice-report
 
293
 * Account Payment Addons: https://launchpad.net/account-payment
 
294
 * Account - Closing: https://launchpad.net/account-closing
 
295
 * Account - Consolidation: https://launchpad.net/account-consolidation
 
296
 * Account - Financial Tools: https://launchpad.net/account-financial-tools
 
297
 * Account - Invoicing: https://launchpad.net/account-invoicing
 
298
 * Contract management: https://launchpad.net/contract-management
 
299
 * OpenERP Fiscal Rule: https://launchpad.net/openerp-fiscal-rules
 
300
 * Margin Analysis: https://launchpad.net/margin-analysis
 
301
 * Medical in OpenERP : https://launchpad.net/oemedical
 
302
 * Construction : https://launchpad.net/openerp-construction
 
303
 * Project Management - Invoicing and Reporting: https://launchpad.net/project-reporting
 
304
 * Project Management - Services: https://launchpad.net/project-service
 
305
 * HR - Timesheet Management: https://launchpad.net/hr-timesheet
 
306
 * Hotel Management System on OpenERP : https://launchpad.net/hotel-management-system
 
307
 * Department Management: https://launchpad.net/department-mgmt
 
308
 * Server Environment And Tools: https://launchpad.net/server-env-tools
 
309
 * Webkit Utils: https://launchpad.net/webkit-utils
 
310
 * E-Commerce addons: https://launchpad.net/e-commerce-addons
 
311
 * Report - Printing and Sending: https://launchpad.net/report-print-send
 
312
 * Management Systems : https://launchpad.net/openerp-mgmtsystem
 
313
 * Web-Addons for OpenERP : https://launchpad.net/web-addons
 
314
 * Geospatial Addons for OpenERP : https://launchpad.net/geospatial-addons
 
315
 
 
316
.. i18n: Some of them are waiting on their owner to bring some modifications so they can fit into other projects (changing team, series,...).
 
317
.. i18n: Should you be one of these owners, please inform the others on the mailing-list when ready.
 
318
.. i18n: If some refuse to open the projects to the community, it is always possibel to create another project.
 
319
..
 
320
 
 
321
Some of them are waiting on their owner to bring some modifications so they can fit into other projects (changing team, series,...).
 
322
Should you be one of these owners, please inform the others on the mailing-list when ready.
 
323
If some refuse to open the projects to the community, it is always possibel to create another project.
 
324
 
 
325
.. i18n: Misc Guidelines
 
326
.. i18n: +++++++++++++++
 
327
..
 
328
 
 
329
Misc Guidelines
 
330
+++++++++++++++
 
331
 
 
332
.. i18n: Modules
 
333
.. i18n: ^^^^^^^
 
334
..
 
335
 
 
336
Modules
 
337
^^^^^^^
 
338
 
 
339
.. i18n: Organisation of files in modules
 
340
.. i18n: ################################
 
341
..
 
342
 
 
343
Organisation of files in modules
 
344
################################
 
345
 
 
346
.. i18n: .. === Organisation of files in modules ===
 
347
..
 
348
 
 
349
.. === Organisation of files in modules ===
 
350
 
 
351
.. i18n: The structure of a module should be::
 
352
.. i18n: 
 
353
.. i18n:  /module_name/
 
354
.. i18n:  /module_name/__init__.py
 
355
.. i18n:  /module_name/__openerp__.py
 
356
.. i18n:  /module_name/i18n
 
357
.. i18n:  /module_name/i18n/module_name.pot
 
358
.. i18n:  /module_name/images/
 
359
.. i18n:  /module_name/images/screenshot.png
 
360
.. i18n:  /module_name/migrations
 
361
.. i18n:  /module_name/module.py
 
362
.. i18n:  /module_name/module_view.xml
 
363
.. i18n:  /module_name/module_wizard.xml
 
364
.. i18n:  /module_name/module_report.xml
 
365
.. i18n:  /module_name/module_data.xml
 
366
.. i18n:  /module_name/module_demo.xml
 
367
.. i18n:  /module_name/module_security.xml
 
368
.. i18n:  /module_name/wizard/
 
369
.. i18n:  /module_name/wizard/__init__.py
 
370
.. i18n:  /module_name/wizard/wizard_name.py
 
371
.. i18n:  /module_name/wizard/wizard_name_view.xml
 
372
.. i18n:  /module_name/wizard/wizard_name_workflow.xml
 
373
.. i18n:  /module_name/report/
 
374
.. i18n:  /module_name/report/__init__.py
 
375
.. i18n:  /module_name/report/report_name.sxw
 
376
.. i18n:  /module_name/report/report_name.rml
 
377
.. i18n:  /module_name/report/report_name.py
 
378
.. i18n:  /module_name/security
 
379
.. i18n:  /module_name/security/ir.model.access.csv
 
380
.. i18n:  /module_name/static/src/img/icon.png
 
381
.. i18n:  /module_name/tests
 
382
..
 
383
 
 
384
The structure of a module should be::
 
385
 
 
386
 /module_name/
 
387
 /module_name/__init__.py
 
388
 /module_name/__openerp__.py
 
389
 /module_name/i18n
 
390
 /module_name/i18n/module_name.pot
 
391
 /module_name/images/
 
392
 /module_name/images/screenshot.png
 
393
 /module_name/migrations
 
394
 /module_name/module.py
 
395
 /module_name/module_view.xml
 
396
 /module_name/module_wizard.xml
 
397
 /module_name/module_report.xml
 
398
 /module_name/module_data.xml
 
399
 /module_name/module_demo.xml
 
400
 /module_name/module_security.xml
 
401
 /module_name/wizard/
 
402
 /module_name/wizard/__init__.py
 
403
 /module_name/wizard/wizard_name.py
 
404
 /module_name/wizard/wizard_name_view.xml
 
405
 /module_name/wizard/wizard_name_workflow.xml
 
406
 /module_name/report/
 
407
 /module_name/report/__init__.py
 
408
 /module_name/report/report_name.sxw
 
409
 /module_name/report/report_name.rml
 
410
 /module_name/report/report_name.py
 
411
 /module_name/security
 
412
 /module_name/security/ir.model.access.csv
 
413
 /module_name/static/src/img/icon.png
 
414
 /module_name/tests
 
415
 
 
416
.. i18n: Security
 
417
.. i18n: ########
 
418
..
 
419
 
 
420
Security
 
421
########
 
422
 
 
423
.. i18n: Each object defined in your module must have at least one security rule
 
424
.. i18n: defined on it to make it accessible.
 
425
..
 
426
 
 
427
Each object defined in your module must have at least one security rule
 
428
defined on it to make it accessible.
 
429
 
 
430
.. i18n: Coding Guidelines
 
431
.. i18n: #################
 
432
..
 
433
 
 
434
Coding Guidelines
 
435
#################
 
436
 
 
437
.. i18n: Follow Python PEP 8: http://www.python.org/dev/peps/pep-0008/
 
438
..
 
439
 
 
440
Follow Python PEP 8: http://www.python.org/dev/peps/pep-0008/
 
441
 
 
442
.. i18n: Reporting
 
443
.. i18n: ^^^^^^^^^
 
444
..
 
445
 
 
446
Reporting
 
447
^^^^^^^^^
 
448
 
 
449
.. i18n: General Style
 
450
.. i18n: #############
 
451
..
 
452
 
 
453
General Style
 
454
#############
 
455
 
 
456
.. i18n:   * use the Helvetica font everywhere
 
457
.. i18n:   * margins (in millimeters):
 
458
.. i18n: 
 
459
.. i18n:     - top: 14
 
460
.. i18n:     - bottom: 16
 
461
.. i18n:     - left: between 12 and 13 to allow punching holes without punching in the text area
 
462
.. i18n:     - right: between 12 and 13
 
463
..
 
464
 
 
465
  * use the Helvetica font everywhere
 
466
  * margins (in millimeters):
 
467
 
 
468
    - top: 14
 
469
    - bottom: 16
 
470
    - left: between 12 and 13 to allow punching holes without punching in the text area
 
471
    - right: between 12 and 13
 
472
 
 
473
.. i18n:     .. note:: the line separator between the header and the body can overlap slightly in the left and right margins: up to 9 millimeters on the left and up to 12 millimeters on the right
 
474
.. i18n: 
 
475
.. i18n:   * for Titles use font *Helvetica-Bold* with size *14.5*
 
476
.. i18n: 
 
477
.. i18n:   * put the context on each report: example, for the report account_balance: the context is the fiscal year and periods
 
478
.. i18n: 
 
479
.. i18n:   * for the name of cells: use Capital Letter if the name contains more than one word (ex: Date Ordered)
 
480
.. i18n:   * content and name of cells should have the same indentation
 
481
.. i18n: 
 
482
.. i18n:   * for report, we can define two kinds of arrays:
 
483
.. i18n: 
 
484
.. i18n:     - array with general information, like reference, date..., use:
 
485
.. i18n: 
 
486
.. i18n:       + *Bold-Helvetica* and size=8 for cells name
 
487
.. i18n:       + *Helvetica* size="8" for content
 
488
.. i18n:       
 
489
.. i18n:     - array with detailed information, use:
 
490
.. i18n: 
 
491
.. i18n:       + *Helvetica-Bold* size *9* for cells names
 
492
.. i18n:       + *Helvetica* size *8* for content
 
493
..
 
494
 
 
495
    .. note:: the line separator between the header and the body can overlap slightly in the left and right margins: up to 9 millimeters on the left and up to 12 millimeters on the right
 
496
 
 
497
  * for Titles use font *Helvetica-Bold* with size *14.5*
 
498
 
 
499
  * put the context on each report: example, for the report account_balance: the context is the fiscal year and periods
 
500
 
 
501
  * for the name of cells: use Capital Letter if the name contains more than one word (ex: Date Ordered)
 
502
  * content and name of cells should have the same indentation
 
503
 
 
504
  * for report, we can define two kinds of arrays:
 
505
 
 
506
    - array with general information, like reference, date..., use:
 
507
 
 
508
      + *Bold-Helvetica* and size=8 for cells name
 
509
      + *Helvetica* size="8" for content
 
510
      
 
511
    - array with detailed information, use:
 
512
 
 
513
      + *Helvetica-Bold* size *9* for cells names
 
514
      + *Helvetica* size *8* for content
 
515
 
 
516
.. i18n: .. describe:: Headers and footers for internal reports:
 
517
.. i18n: 
 
518
.. i18n:   * Internal report = all accounting reports and other that have only internal use (not sent to customers)
 
519
.. i18n:   * height of headers should be shorter
 
520
.. i18n:   * take off corporate header and footer for internal report (Use a simplified header for internal reports: Company's name, report title, printing date and page number)
 
521
.. i18n: 
 
522
.. i18n:   * header:
 
523
.. i18n: 
 
524
.. i18n:     - company's name: in the middle of each page
 
525
.. i18n:     - report's name: is printed centered after the header
 
526
.. i18n:     - printing date: not in the middle of the report, but on the left in the header
 
527
.. i18n:     - page number: on each page, is printed on the right. This page number should contain the current page number and the total of pages. Ex: page 3/15
 
528
.. i18n:   * footer:
 
529
.. i18n: 
 
530
.. i18n:     - to avoid wasting paper, we have taken off the footer
 
531
..
 
532
 
 
533
.. describe:: Headers and footers for internal reports:
 
534
 
 
535
  * Internal report = all accounting reports and other that have only internal use (not sent to customers)
 
536
  * height of headers should be shorter
 
537
  * take off corporate header and footer for internal report (Use a simplified header for internal reports: Company's name, report title, printing date and page number)
 
538
 
 
539
  * header:
 
540
 
 
541
    - company's name: in the middle of each page
 
542
    - report's name: is printed centered after the header
 
543
    - printing date: not in the middle of the report, but on the left in the header
 
544
    - page number: on each page, is printed on the right. This page number should contain the current page number and the total of pages. Ex: page 3/15
 
545
  * footer:
 
546
 
 
547
    - to avoid wasting paper, we have taken off the footer
 
548
 
 
549
.. i18n: .. describe:: table line separator:
 
550
..
 
551
 
 
552
.. describe:: table line separator:
 
553
 
 
554
.. i18n: * it's prettier if each line in a table has a light grey line as separator
 
555
.. i18n: * use a grey column separator only for array containing general information
 
556
..
 
557
 
 
558
* it's prettier if each line in a table has a light grey line as separator
 
559
* use a grey column separator only for array containing general information
 
560
 
 
561
.. i18n: .. describe:: table breaking
 
562
.. i18n: 
 
563
.. i18n:   * a table header should at least have two data rows (no table header alone at the bottom of the page)
 
564
.. i18n:   * when a big table is broken, the table header is repeated on every page
 
565
..
 
566
 
 
567
.. describe:: table breaking
 
568
 
 
569
  * a table header should at least have two data rows (no table header alone at the bottom of the page)
 
570
  * when a big table is broken, the table header is repeated on every page
 
571
 
 
572
.. i18n: .. describe:: how to differentiate parents and children ?
 
573
.. i18n: 
 
574
.. i18n:   * When you have more than one level, use these styles:
 
575
.. i18n: 
 
576
.. i18n:   - for the levels 1 and 2:fontSize="8.0" fontName="Helvetica-Bold"
 
577
.. i18n:   - from the third level, use:fontName="Helvetica" fontSize="8.0" and increase the indentation with  13 (pixels) for each level
 
578
.. i18n:   - underline sums when the element is a parent
 
579
..
 
580
 
 
581
.. describe:: how to differentiate parents and children ?
 
582
 
 
583
  * When you have more than one level, use these styles:
 
584
 
 
585
  - for the levels 1 and 2:fontSize="8.0" fontName="Helvetica-Bold"
 
586
  - from the third level, use:fontName="Helvetica" fontSize="8.0" and increase the indentation with  13 (pixels) for each level
 
587
  - underline sums when the element is a parent
 
588
 
 
589
.. i18n: Modules
 
590
.. i18n: """""""
 
591
..
 
592
 
 
593
Modules
 
594
"""""""
 
595
 
 
596
.. i18n: Naming Convention
 
597
.. i18n: ^^^^^^^^^^^^^^^^^
 
598
..
 
599
 
 
600
Naming Convention
 
601
^^^^^^^^^^^^^^^^^
 
602
 
 
603
.. i18n: The name of the module are all lowercase, each word separated by underscores.
 
604
.. i18n: Always start with the most relevant words, which are preferably names of other
 
605
.. i18n: modules on which it depends.
 
606
..
 
607
 
 
608
The name of the module are all lowercase, each word separated by underscores.
 
609
Always start with the most relevant words, which are preferably names of other
 
610
modules on which it depends.
 
611
 
 
612
.. i18n: Example:
 
613
..
 
614
 
 
615
Example:
 
616
 
 
617
.. i18n:   * account_invoice_layout
 
618
..
 
619
 
 
620
  * account_invoice_layout
 
621
 
 
622
.. i18n: Information Required
 
623
.. i18n: ^^^^^^^^^^^^^^^^^^^^
 
624
..
 
625
 
 
626
Information Required
 
627
^^^^^^^^^^^^^^^^^^^^
 
628
 
 
629
.. i18n: Each module must contain at least:
 
630
..
 
631
 
 
632
Each module must contain at least:
 
633
 
 
634
.. i18n:   * name
 
635
.. i18n:   * description
 
636
..
 
637
 
 
638
  * name
 
639
  * description
 
640
 
 
641
.. i18n: Modules Description
 
642
.. i18n: ^^^^^^^^^^^^^^^^^^^
 
643
..
 
644
 
 
645
Modules Description
 
646
^^^^^^^^^^^^^^^^^^^
 
647
 
 
648
.. i18n: Dependencies
 
649
.. i18n: ^^^^^^^^^^^^
 
650
..
 
651
 
 
652
Dependencies
 
653
^^^^^^^^^^^^
 
654
 
 
655
.. i18n: Each module must contain:
 
656
..
 
657
 
 
658
Each module must contain:
 
659
 
 
660
.. i18n:   * A list of dependencies amongst others modules: ['account','sale']
 
661
.. i18n: 
 
662
.. i18n:   * Provide only highest requirement level, not need to set ['account','base','product','sale']
 
663
..
 
664
 
 
665
  * A list of dependencies amongst others modules: ['account','sale']
 
666
 
 
667
  * Provide only highest requirement level, not need to set ['account','base','product','sale']
 
668
 
 
669
.. i18n: Module Content
 
670
.. i18n: ^^^^^^^^^^^^^^
 
671
..
 
672
 
 
673
Module Content
 
674
^^^^^^^^^^^^^^
 
675
 
 
676
.. i18n: Each module must contain demo data for every object defined in the module.
 
677
..
 
678
 
 
679
Each module must contain demo data for every object defined in the module.
 
680
 
 
681
.. i18n: If you implemented workflows in the module, create demo data that passes
 
682
.. i18n: most branches of your workflow. You can use the module recorder to help you
 
683
.. i18n: build such demo data.
 
684
..
 
685
 
 
686
If you implemented workflows in the module, create demo data that passes
 
687
most branches of your workflow. You can use the module recorder to help you
 
688
build such demo data.
 
689
 
 
690
.. i18n: Menus
 
691
.. i18n: ^^^^^
 
692
..
 
693
 
 
694
Menus
 
695
^^^^^
 
696
 
 
697
.. i18n: Naming Menus
 
698
.. i18n: ############
 
699
..
 
700
 
 
701
Naming Menus
 
702
############
 
703
 
 
704
.. i18n:   * Use plural forms: *Customer Invoice*, should be *Customer Invoices*
 
705
.. i18n:   * Avoid abbreviations in menus if possible. Example: BoMs -> Bills of Materials
 
706
..
 
707
 
 
708
  * Use plural forms: *Customer Invoice*, should be *Customer Invoices*
 
709
  * Avoid abbreviations in menus if possible. Example: BoMs -> Bills of Materials
 
710
 
 
711
.. i18n: Order of the menus
 
712
.. i18n: ##################
 
713
..
 
714
 
 
715
Order of the menus
 
716
##################
 
717
 
 
718
.. i18n: The *Reporting* menu is at the bottom of the list, use a sequence=50.
 
719
..
 
720
 
 
721
The *Reporting* menu is at the bottom of the list, use a sequence=50.
 
722
 
 
723
.. i18n: Common Mistakes
 
724
.. i18n: ###############
 
725
..
 
726
 
 
727
Common Mistakes
 
728
###############
 
729
 
 
730
.. i18n:   * Edit Categories -> Categories
 
731
.. i18n:   * List of Categories -> Categories
 
732
..
 
733
 
 
734
  * Edit Categories -> Categories
 
735
  * List of Categories -> Categories
 
736
 
 
737
.. i18n: Search Criteria
 
738
.. i18n: #################
 
739
..
 
740
 
 
741
Search Criteria
 
742
#################
 
743
 
 
744
.. i18n: Search criteria: search available on all columns of the list view
 
745
..
 
746
 
 
747
Search criteria: search available on all columns of the list view
 
748
 
 
749
.. i18n: Default Language
 
750
.. i18n: ^^^^^^^^^^^^^^^^
 
751
..
 
752
 
 
753
Default Language
 
754
^^^^^^^^^^^^^^^^
 
755
 
 
756
.. i18n: The default language for every development must be U.S. English.
 
757
..
 
758
 
 
759
The default language for every development must be U.S. English.
 
760
 
 
761
.. i18n: For menus and fields, use uppercase for all first letters, excluding conjections:
 
762
..
 
763
 
 
764
For menus and fields, use uppercase for all first letters, excluding conjections:
 
765
 
 
766
.. i18n:   * Chart of Accounts
 
767
..
 
768
 
 
769
  * Chart of Accounts
 
770
 
 
771
.. i18n: Field Naming Conventions
 
772
.. i18n: ^^^^^^^^^^^^^^^^^^^^^^^^
 
773
..
 
774
 
 
775
Field Naming Conventions
 
776
^^^^^^^^^^^^^^^^^^^^^^^^
 
777
 
 
778
.. i18n:   * many2one fields should respect this regex: '.*_id'
 
779
.. i18n:   * one2many fields should respect this regex: '.*_ids'
 
780
.. i18n:   * one2many relation table should respect this regex: '.*_rel'
 
781
.. i18n:   * many2many fields should respect this regex: '.*_ids'
 
782
.. i18n:   * use underscore to separate words
 
783
.. i18n:   * avoid using uppercase
 
784
.. i18n:   * if a field is composed of several words, start with the most important words
 
785
..
 
786
 
 
787
  * many2one fields should respect this regex: '.*_id'
 
788
  * one2many fields should respect this regex: '.*_ids'
 
789
  * one2many relation table should respect this regex: '.*_rel'
 
790
  * many2many fields should respect this regex: '.*_ids'
 
791
  * use underscore to separate words
 
792
  * avoid using uppercase
 
793
  * if a field is composed of several words, start with the most important words
 
794
 
 
795
.. i18n: Model Naming Conventions
 
796
.. i18n: ^^^^^^^^^^^^^^^^^^^^^^^^
 
797
..
 
798
 
 
799
Model Naming Conventions
 
800
^^^^^^^^^^^^^^^^^^^^^^^^
 
801
 
 
802
.. i18n: * All objects must start with the name of the module they are defined in.
 
803
.. i18n: * If an object is composed of several words, use points to separate words
 
804
..
 
805
 
 
806
* All objects must start with the name of the module they are defined in.
 
807
* If an object is composed of several words, use points to separate words
 
808
 
 
809
.. i18n: Terminology
 
810
.. i18n: ^^^^^^^^^^^
 
811
..
 
812
 
 
813
Terminology
 
814
^^^^^^^^^^^
 
815
 
 
816
.. i18n:   * All Tree of resources are called *XXX's Structure*, unless a dedicated term exist for the concept
 
817
.. i18n: 
 
818
.. i18n:     - Good: Location' Structure, Chart of Accounts, Categories' Structure
 
819
.. i18n:     - Bad: Tree of Category, Tree of Bill of Materials
 
820
..
 
821
 
 
822
  * All Tree of resources are called *XXX's Structure*, unless a dedicated term exist for the concept
 
823
 
 
824
    - Good: Location' Structure, Chart of Accounts, Categories' Structure
 
825
    - Bad: Tree of Category, Tree of Bill of Materials