~openerp-community/openobject-doc/ksa-openobject-doc-6.0

« back to all changes in this revision

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

  • Committer: Don Kirkby
  • Date: 2011-02-21 20:46:11 UTC
  • mfrom: (433.1.53 openobject-doc)
  • Revision ID: donkirkby+launpd@gmail.com-20110221204611-1ykt6dmg4k3gh5dh
[MERGE] revisions 477 to 486 from the 5.0 branch.

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 found informations about the organisation of the community in
 
26
.. i18n: OpenERP project. It include a description of the different tools used, the role
 
27
.. i18n: of the differents actors, and the different process for improvement management.
 
28
..
 
29
 
 
30
Here you will found informations about the organisation of the community in
 
31
OpenERP project. It include a description of the different tools used, the role
 
32
of the differents 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-bi**          | https://launchpad.net/openobject-bin         | business intelligence project              |
 
51
.. i18n: |                            |                                              |                                            |
 
52
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
53
.. i18n: |                            |                                              |                                            |
 
54
.. i18n: | **openobject-server**      | https://launchpad.net/openobject-server      |  the openobject server                     |
 
55
.. i18n: |                            |                                              |                                            |
 
56
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
57
.. i18n: |                            |                                              |                                            |
 
58
.. i18n: | **openobject-client**      | https://launchpad.net/openobject-client      | the openobject application client (gtk)    |
 
59
.. i18n: |                            |                                              |                                            |
 
60
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
61
.. i18n: |                            |                                              |                                            |
 
62
.. i18n: | **openobject-client-web**  | https://launchpad.net/openobject-client-web  | the openobject web client (previously      |
 
63
.. i18n: |                            |                                              | called eTiny)                              |
 
64
.. i18n: |                            |                                              |                                            |
 
65
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
66
.. i18n: |                            |                                              |                                            |
 
67
.. i18n: | **openobject-addons**      | https://launchpad.net/openobject-addons      | the project for all modules about          |
 
68
.. i18n: |                            |                                              | openobject                                 |
 
69
.. i18n: |                            |                                              |                                            |
 
70
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
71
.. i18n: |                            |                                              |                                            |
 
72
.. i18n: | **openerp**                | https://launchpad.net/openerp                | packaging around openobject (a selection   |
 
73
.. i18n: |                            |                                              | of modules to build applications)          |
 
74
.. i18n: |                            |                                              |                                            |
 
75
.. i18n: +----------------------------+----------------------------------------------+--------------------------------------------+
 
76
..
 
77
 
 
78
+----------------------------+----------------------------------------------+--------------------------------------------+
 
79
| **Project name**           | **URL**                                      | **Description**                            |
 
80
+============================+==============================================+============================================+
 
81
|                            |                                              |                                            |
 
82
| **openobject**             | https://launchpad.net/openobject             | the main super-project (group) where all   |
 
83
|                            |                                              | bugs, features and faq are managed         |
 
84
|                            |                                              |                                            |
 
85
+----------------------------+----------------------------------------------+--------------------------------------------+
 
86
|                            |                                              |                                            |
 
87
| **openobject-bi**          | https://launchpad.net/openobject-bin         | business intelligence project              |
 
88
|                            |                                              |                                            |
 
89
+----------------------------+----------------------------------------------+--------------------------------------------+
 
90
|                            |                                              |                                            |
 
91
| **openobject-server**      | https://launchpad.net/openobject-server      |  the openobject server                     |
 
92
|                            |                                              |                                            |
 
93
+----------------------------+----------------------------------------------+--------------------------------------------+
 
94
|                            |                                              |                                            |
 
95
| **openobject-client**      | https://launchpad.net/openobject-client      | the openobject application client (gtk)    |
 
96
|                            |                                              |                                            |
 
97
+----------------------------+----------------------------------------------+--------------------------------------------+
 
98
|                            |                                              |                                            |
 
99
| **openobject-client-web**  | https://launchpad.net/openobject-client-web  | the openobject web client (previously      |
 
100
|                            |                                              | called eTiny)                              |
 
101
|                            |                                              |                                            |
 
102
+----------------------------+----------------------------------------------+--------------------------------------------+
 
103
|                            |                                              |                                            |
 
104
| **openobject-addons**      | https://launchpad.net/openobject-addons      | the project for all modules about          |
 
105
|                            |                                              | openobject                                 |
 
106
|                            |                                              |                                            |
 
107
+----------------------------+----------------------------------------------+--------------------------------------------+
 
108
|                            |                                              |                                            |
 
109
| **openerp**                | https://launchpad.net/openerp                | packaging around openobject (a selection   |
 
110
|                            |                                              | of modules to build applications)          |
 
111
|                            |                                              |                                            |
 
112
+----------------------------+----------------------------------------------+--------------------------------------------+
 
113
 
 
114
.. i18n: Getting Sources
 
115
.. i18n: +++++++++++++++
 
116
..
 
117
 
 
118
Getting Sources
 
119
+++++++++++++++
 
120
 
 
121
.. i18n: Please refer to :ref:`how-to-get-the-latest-trunk-source-code-link` in the Bazaar section
 
122
..
 
123
 
 
124
Please refer to :ref:`how-to-get-the-latest-trunk-source-code-link` in the Bazaar section
 
125
 
 
126
.. i18n: If you don't know the Bazaar version control system, please read the :ref:`documentation on Bazaar <bazaar-link>`
 
127
..
 
128
 
 
129
If you don't know the Bazaar version control system, please read the :ref:`documentation on Bazaar <bazaar-link>`
 
130
 
 
131
.. i18n: Coding Guidelines
 
132
.. i18n: +++++++++++++++++
 
133
..
 
134
 
 
135
Coding Guidelines
 
136
+++++++++++++++++
 
137
 
 
138
.. i18n: Development Guidelines
 
139
.. i18n: """"""""""""""""""""""
 
140
..
 
141
 
 
142
Development Guidelines
 
143
""""""""""""""""""""""
 
144
 
 
145
.. i18n: Modules
 
146
.. i18n: ^^^^^^^
 
147
..
 
148
 
 
149
Modules
 
150
^^^^^^^
 
151
 
 
152
.. i18n: Organisation of files in modules
 
153
.. i18n: ################################
 
154
..
 
155
 
 
156
Organisation of files in modules
 
157
################################
 
158
 
 
159
.. i18n: .. === Organisation of files in modules ===
 
160
..
 
161
 
 
162
.. === Organisation of files in modules ===
 
163
 
 
164
.. i18n: The structure of a module should be like this::
 
165
.. i18n: 
 
166
.. i18n:  /module_name/
 
167
.. i18n:  /module_name/__init__.py
 
168
.. i18n:  /module_name/__terp__.py
 
169
.. i18n:  /module_name/module.py
 
170
.. i18n:  /module_name/module_view.xml
 
171
.. i18n:  /module_name/module_wizard.xml
 
172
.. i18n:  /module_name/module_report.xml
 
173
.. i18n:  /module_name/module_data.xml
 
174
.. i18n:  /module_name/module_demo.xml
 
175
.. i18n:  /module_name/module_security.xml
 
176
.. i18n:  /module_name/wizard/
 
177
.. i18n:  /module_name/wizard/__init__.py
 
178
.. i18n:  /module_name/wizard/wizard_name.py
 
179
.. i18n:  /module_name/wizard/wizard_name_view.xml
 
180
.. i18n:  /module_name/wizard/wizard_name_workflow.xml
 
181
.. i18n:  /module_name/report/
 
182
.. i18n:  /module_name/report/__init__.py
 
183
.. i18n:  /module_name/report/report_name.sxw
 
184
.. i18n:  /module_name/report/report_name.rml
 
185
.. i18n:  /module_name/report/report_name.py
 
186
..
 
187
 
 
188
The structure of a module should be like this::
 
189
 
 
190
 /module_name/
 
191
 /module_name/__init__.py
 
192
 /module_name/__terp__.py
 
193
 /module_name/module.py
 
194
 /module_name/module_view.xml
 
195
 /module_name/module_wizard.xml
 
196
 /module_name/module_report.xml
 
197
 /module_name/module_data.xml
 
198
 /module_name/module_demo.xml
 
199
 /module_name/module_security.xml
 
200
 /module_name/wizard/
 
201
 /module_name/wizard/__init__.py
 
202
 /module_name/wizard/wizard_name.py
 
203
 /module_name/wizard/wizard_name_view.xml
 
204
 /module_name/wizard/wizard_name_workflow.xml
 
205
 /module_name/report/
 
206
 /module_name/report/__init__.py
 
207
 /module_name/report/report_name.sxw
 
208
 /module_name/report/report_name.rml
 
209
 /module_name/report/report_name.py
 
210
 
 
211
.. i18n: Objects and fields namings
 
212
.. i18n: ##########################
 
213
..
 
214
 
 
215
Objects and fields namings
 
216
##########################
 
217
 
 
218
.. i18n: Security
 
219
.. i18n: ########
 
220
..
 
221
 
 
222
Security
 
223
########
 
224
 
 
225
.. i18n: Each object defined in your module must have at least one security rule
 
226
.. i18n: defined on it to make it accessible.
 
227
..
 
228
 
 
229
Each object defined in your module must have at least one security rule
 
230
defined on it to make it accessible.
 
231
 
 
232
.. i18n: Development
 
233
.. i18n: ^^^^^^^^^^^
 
234
..
 
235
 
 
236
Development
 
237
^^^^^^^^^^^
 
238
 
 
239
.. i18n: Coding Guidelines
 
240
.. i18n: #################
 
241
..
 
242
 
 
243
Coding Guidelines
 
244
#################
 
245
 
 
246
.. i18n: Follow Python PEP 8: http://www.python.org/dev/peps/pep-0008/
 
247
..
 
248
 
 
249
Follow Python PEP 8: http://www.python.org/dev/peps/pep-0008/
 
250
 
 
251
.. i18n: Reporting
 
252
.. i18n: ^^^^^^^^^
 
253
..
 
254
 
 
255
Reporting
 
256
^^^^^^^^^
 
257
 
 
258
.. i18n: General Style
 
259
.. i18n: #############
 
260
..
 
261
 
 
262
General Style
 
263
#############
 
264
 
 
265
.. i18n:   * use the Helvetica font everywhere
 
266
.. i18n:   * margins (in millimeters):
 
267
.. i18n: 
 
268
.. i18n:     - top: 14
 
269
.. i18n:     - bottom: 16
 
270
.. i18n:     - left: between 12 and 13 to allow punching holes without punching in the text area
 
271
.. i18n:     - right: between 12 and 13
 
272
..
 
273
 
 
274
  * use the Helvetica font everywhere
 
275
  * margins (in millimeters):
 
276
 
 
277
    - top: 14
 
278
    - bottom: 16
 
279
    - left: between 12 and 13 to allow punching holes without punching in the text area
 
280
    - right: between 12 and 13
 
281
 
 
282
.. 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
 
283
.. i18n: 
 
284
.. i18n:   * for Titles use the font *Heveltica-Bold* with the size *14.5*
 
285
.. i18n: 
 
286
.. i18n:   * put the context on each report: example, for the report account_balance: the context is the fiscal year and periods
 
287
.. i18n: 
 
288
.. i18n:   * for the name of cells: use Capital Letter if the name contains more than one word (ex: Date Ordered)
 
289
.. i18n:   * content and name of cells should have the same indentation
 
290
.. i18n: 
 
291
.. i18n:   * for report, we can define two kinds of arrays:
 
292
.. i18n: 
 
293
.. i18n:     - array with general information, like reference, date..., use:
 
294
.. i18n: 
 
295
.. i18n:       + *Bold-Helvetica* and size=8 for cells name
 
296
.. i18n:       + *Helvetica* size="8" for content
 
297
.. i18n:       
 
298
.. i18n:     - array with detailed information, use:
 
299
.. i18n: 
 
300
.. i18n:       + *Helvetica-Bold* size *9* for cells names
 
301
.. i18n:       + *Helvetica* size *8* for content
 
302
..
 
303
 
 
304
    .. 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
 
305
 
 
306
  * for Titles use the font *Heveltica-Bold* with the size *14.5*
 
307
 
 
308
  * put the context on each report: example, for the report account_balance: the context is the fiscal year and periods
 
309
 
 
310
  * for the name of cells: use Capital Letter if the name contains more than one word (ex: Date Ordered)
 
311
  * content and name of cells should have the same indentation
 
312
 
 
313
  * for report, we can define two kinds of arrays:
 
314
 
 
315
    - array with general information, like reference, date..., use:
 
316
 
 
317
      + *Bold-Helvetica* and size=8 for cells name
 
318
      + *Helvetica* size="8" for content
 
319
      
 
320
    - array with detailed information, use:
 
321
 
 
322
      + *Helvetica-Bold* size *9* for cells names
 
323
      + *Helvetica* size *8* for content
 
324
 
 
325
.. i18n: .. describe:: Headers and footers for internal reports:
 
326
.. i18n: 
 
327
.. i18n:   * Internal report = all accounting reports and other that have only internal use (not sent to customers)
 
328
.. i18n:   * height of headers should be shorter
 
329
.. 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)
 
330
.. i18n: 
 
331
.. i18n:   * header:
 
332
.. i18n: 
 
333
.. i18n:     - company's name: in the middle of each page
 
334
.. i18n:     - report's name: is printed centered after the header
 
335
.. i18n:     - printing date: not in the middle of the report, but on the left in the header
 
336
.. 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
 
337
.. i18n:   * footer:
 
338
.. i18n: 
 
339
.. i18n:     - to avoid wasting paper, we have taken off the footer
 
340
..
 
341
 
 
342
.. describe:: Headers and footers for internal reports:
 
343
 
 
344
  * Internal report = all accounting reports and other that have only internal use (not sent to customers)
 
345
  * height of headers should be shorter
 
346
  * 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)
 
347
 
 
348
  * header:
 
349
 
 
350
    - company's name: in the middle of each page
 
351
    - report's name: is printed centered after the header
 
352
    - printing date: not in the middle of the report, but on the left in the header
 
353
    - 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
 
354
  * footer:
 
355
 
 
356
    - to avoid wasting paper, we have taken off the footer
 
357
 
 
358
.. i18n: .. describe:: table line separator:
 
359
..
 
360
 
 
361
.. describe:: table line separator:
 
362
 
 
363
.. i18n: * it's prettier if each line in the table have a light grey line as separator
 
364
.. i18n: * use a grey column separator only for array containing general information
 
365
..
 
366
 
 
367
* it's prettier if each line in the table have a light grey line as separator
 
368
* use a grey column separator only for array containing general information
 
369
 
 
370
.. i18n: .. describe:: table breaking
 
371
.. i18n: 
 
372
.. i18n:   * a table header should at least have two data rows (no table header alone at the bottom of the page)
 
373
.. i18n:   * when a big table is broken, the table header is repeated on every page
 
374
..
 
375
 
 
376
.. describe:: table breaking
 
377
 
 
378
  * a table header should at least have two data rows (no table header alone at the bottom of the page)
 
379
  * when a big table is broken, the table header is repeated on every page
 
380
 
 
381
.. i18n: .. describe:: how to differentiate parents and children ?
 
382
.. i18n: 
 
383
.. i18n:   * When you have more than one level, use these styles:
 
384
.. i18n: 
 
385
.. i18n:   - for the levels 1 and 2:fontSize="8.0" fontName="Helvetica-Bold"
 
386
.. i18n:   - from the third level, use:fontName="Helvetica" fontSize="8.0" and increase the indentation with  13 (pixels) for each level
 
387
.. i18n:   - underline sums when the element is a parent
 
388
..
 
389
 
 
390
.. describe:: how to differentiate parents and children ?
 
391
 
 
392
  * When you have more than one level, use these styles:
 
393
 
 
394
  - for the levels 1 and 2:fontSize="8.0" fontName="Helvetica-Bold"
 
395
  - from the third level, use:fontName="Helvetica" fontSize="8.0" and increase the indentation with  13 (pixels) for each level
 
396
  - underline sums when the element is a parent
 
397
 
 
398
.. i18n: Modules
 
399
.. i18n: """""""
 
400
..
 
401
 
 
402
Modules
 
403
"""""""
 
404
 
 
405
.. i18n: Naming Convention
 
406
.. i18n: ^^^^^^^^^^^^^^^^^
 
407
..
 
408
 
 
409
Naming Convention
 
410
^^^^^^^^^^^^^^^^^
 
411
 
 
412
.. i18n: The name of the module are all lowercase, each word separated by underscrores.
 
413
.. i18n: Start always by the most relevant words, which are preferably names of others
 
414
.. i18n: modules on which it depends.
 
415
..
 
416
 
 
417
The name of the module are all lowercase, each word separated by underscrores.
 
418
Start always by the most relevant words, which are preferably names of others
 
419
modules on which it depends.
 
420
 
 
421
.. i18n: Exemple:
 
422
..
 
423
 
 
424
Exemple:
 
425
 
 
426
.. i18n:   * account_invoice_layout
 
427
..
 
428
 
 
429
  * account_invoice_layout
 
430
 
 
431
.. i18n: Information Required
 
432
.. i18n: ^^^^^^^^^^^^^^^^^^^^
 
433
..
 
434
 
 
435
Information Required
 
436
^^^^^^^^^^^^^^^^^^^^
 
437
 
 
438
.. i18n: Each module must contains at least:
 
439
..
 
440
 
 
441
Each module must contains at least:
 
442
 
 
443
.. i18n:   * name
 
444
.. i18n:   * description
 
445
..
 
446
 
 
447
  * name
 
448
  * description
 
449
 
 
450
.. i18n: Modules Description
 
451
.. i18n: ^^^^^^^^^^^^^^^^^^^
 
452
..
 
453
 
 
454
Modules Description
 
455
^^^^^^^^^^^^^^^^^^^
 
456
 
 
457
.. i18n: Dependencies
 
458
.. i18n: ^^^^^^^^^^^^
 
459
..
 
460
 
 
461
Dependencies
 
462
^^^^^^^^^^^^
 
463
 
 
464
.. i18n: Each module must contains:
 
465
..
 
466
 
 
467
Each module must contains:
 
468
 
 
469
.. i18n:   * A list of dependencies amongst others modules: ['account','sale']
 
470
.. i18n: 
 
471
.. i18n:     - Provide only highest requirement level, not need to set ['account','base','product','sale']
 
472
.. i18n:   * A version requirement string where base is the OpenERP version as a Python expression
 
473
.. i18n: 
 
474
.. i18n:     - account>=1.0 && base=4.4
 
475
..
 
476
 
 
477
  * A list of dependencies amongst others modules: ['account','sale']
 
478
 
 
479
    - Provide only highest requirement level, not need to set ['account','base','product','sale']
 
480
  * A version requirement string where base is the OpenERP version as a Python expression
 
481
 
 
482
    - account>=1.0 && base=4.4
 
483
 
 
484
.. i18n: Module Content
 
485
.. i18n: ^^^^^^^^^^^^^^
 
486
..
 
487
 
 
488
Module Content
 
489
^^^^^^^^^^^^^^
 
490
 
 
491
.. i18n: Each module must contains dema data for every object defined in the module.
 
492
..
 
493
 
 
494
Each module must contains dema data for every object defined in the module.
 
495
 
 
496
.. i18n: If you implemented workflows in the module, create demo data that passes
 
497
.. i18n: most branches of your workflow. You can use the module recorder to help you
 
498
.. i18n: build such demo data.
 
499
..
 
500
 
 
501
If you implemented workflows in the module, create demo data that passes
 
502
most branches of your workflow. You can use the module recorder to help you
 
503
build such demo data.
 
504
 
 
505
.. i18n: User Interface Guidelines
 
506
.. i18n: """""""""""""""""""""""""
 
507
..
 
508
 
 
509
User Interface Guidelines
 
510
"""""""""""""""""""""""""
 
511
 
 
512
.. i18n: Menus
 
513
.. i18n: ^^^^^
 
514
..
 
515
 
 
516
Menus
 
517
^^^^^
 
518
 
 
519
.. i18n: Organising menus
 
520
.. i18n: ################
 
521
..
 
522
 
 
523
Organising menus
 
524
################
 
525
 
 
526
.. i18n: Here is a good example:
 
527
..
 
528
 
 
529
Here is a good example:
 
530
 
 
531
.. i18n:   * Invoices (list)
 
532
.. i18n: 
 
533
.. i18n:     - Customer Invoices (list)
 
534
..
 
535
 
 
536
  * Invoices (list)
 
537
 
 
538
    - Customer Invoices (list)
 
539
 
 
540
.. i18n:       + Draft Customer Invoices (list)
 
541
.. i18n:       + Open Customer Invoices (list)
 
542
.. i18n:       + New Customer Invoice (form)
 
543
.. i18n:     - Supplier Invoices
 
544
..
 
545
 
 
546
      + Draft Customer Invoices (list)
 
547
      + Open Customer Invoices (list)
 
548
      + New Customer Invoice (form)
 
549
    - Supplier Invoices
 
550
 
 
551
.. i18n:       + ...
 
552
..
 
553
 
 
554
      + ...
 
555
 
 
556
.. i18n: Add a *New ...* menu only if the user requires it, otherwise, open all
 
557
.. i18n: menus as lists. The *New ...* menu open as a form instead of a list. For example,
 
558
.. i18n: don't put *New ...* in a menu in the configuration part.
 
559
..
 
560
 
 
561
Add a *New ...* menu only if the user requires it, otherwise, open all
 
562
menus as lists. The *New ...* menu open as a form instead of a list. For example,
 
563
don't put *New ...* in a menu in the configuration part.
 
564
 
 
565
.. i18n: If you use folders that are clickable, their child must be of the
 
566
.. i18n: same object type. (we suppose that inheritancies are the same objects)
 
567
..
 
568
 
 
569
If you use folders that are clickable, their child must be of the
 
570
same object type. (we suppose that inheritancies are the same objects)
 
571
 
 
572
.. i18n: List are plurals:
 
573
..
 
574
 
 
575
List are plurals:
 
576
 
 
577
.. i18n:   * *Customer Invoice*, should be *Customer Invoices*
 
578
..
 
579
 
 
580
  * *Customer Invoice*, should be *Customer Invoices*
 
581
 
 
582
.. i18n: If you want to create menu that filters on the user (*All* and *My*) put them at the same level:
 
583
..
 
584
 
 
585
If you want to create menu that filters on the user (*All* and *My*) put them at the same level:
 
586
 
 
587
.. i18n:   * Tasks
 
588
.. i18n:   * My Tasks
 
589
..
 
590
 
 
591
  * Tasks
 
592
  * My Tasks
 
593
 
 
594
.. i18n: And not:
 
595
..
 
596
 
 
597
And not:
 
598
 
 
599
.. i18n:   * Tasks
 
600
.. i18n: 
 
601
.. i18n:     - My Tasks
 
602
..
 
603
 
 
604
  * Tasks
 
605
 
 
606
    - My Tasks
 
607
 
 
608
.. i18n: Avoid Abbreviations in menus if possible. Example:
 
609
..
 
610
 
 
611
Avoid Abbreviations in menus if possible. Example:
 
612
 
 
613
.. i18n:   * BoM Lines -> Bill of Materials Lines
 
614
..
 
615
 
 
616
  * BoM Lines -> Bill of Materials Lines
 
617
 
 
618
.. i18n: Reporting Menu
 
619
.. i18n: ##############
 
620
..
 
621
 
 
622
Reporting Menu
 
623
##############
 
624
 
 
625
.. i18n: The dashboard menu must be under the report section of each main menu
 
626
..
 
627
 
 
628
The dashboard menu must be under the report section of each main menu
 
629
 
 
630
.. i18n:   * Good: Sales Management / Reporting / Dashboards / Sales Manager
 
631
.. i18n:   * Bad: Dashboard / Sales / Sales Manager
 
632
..
 
633
 
 
634
  * Good: Sales Management / Reporting / Dashboards / Sales Manager
 
635
  * Bad: Dashboard / Sales / Sales Manager
 
636
 
 
637
.. i18n: If you want to manage the *This Month/ALL months* menu, put them at the latest level:
 
638
..
 
639
 
 
640
If you want to manage the *This Month/ALL months* menu, put them at the latest level:
 
641
 
 
642
.. i18n:   * Reporting/Timesheet by User/All Month
 
643
.. i18n:   * Reporting/Timesheet by User/This Month
 
644
..
 
645
 
 
646
  * Reporting/Timesheet by User/All Month
 
647
  * Reporting/Timesheet by User/This Month
 
648
 
 
649
.. i18n: Icons in the menu
 
650
.. i18n: #################
 
651
..
 
652
 
 
653
Icons in the menu
 
654
#################
 
655
 
 
656
.. i18n:   * The icon of the menu, must be set according to the end action of the wizard, example:
 
657
.. i18n: 
 
658
.. i18n:     - wizard that prints a report, should use a report icon and not a wizard
 
659
.. i18n:     - wizard that opens a list at the end, should use a list icon and not a wizard
 
660
..
 
661
 
 
662
  * The icon of the menu, must be set according to the end action of the wizard, example:
 
663
 
 
664
    - wizard that prints a report, should use a report icon and not a wizard
 
665
    - wizard that opens a list at the end, should use a list icon and not a wizard
 
666
 
 
667
.. i18n: Order of the menus
 
668
.. i18n: ##################
 
669
..
 
670
 
 
671
Order of the menus
 
672
##################
 
673
 
 
674
.. i18n: The configuration menu must be at the top of the list, use a sequence=0
 
675
..
 
676
 
 
677
The configuration menu must be at the top of the list, use a sequence=0
 
678
 
 
679
.. i18n: The *Reporting* menu is at the bottom of the list, use a sequence=50.
 
680
..
 
681
 
 
682
The *Reporting* menu is at the bottom of the list, use a sequence=50.
 
683
 
 
684
.. i18n: Common Mistakes
 
685
.. i18n: ###############
 
686
..
 
687
 
 
688
Common Mistakes
 
689
###############
 
690
 
 
691
.. i18n:   * Edit Categories -> Categories
 
692
.. i18n:   * List of Categories -> Categories
 
693
..
 
694
 
 
695
  * Edit Categories -> Categories
 
696
  * List of Categories -> Categories
 
697
 
 
698
.. i18n: Views
 
699
.. i18n: ^^^^^
 
700
..
 
701
 
 
702
Views
 
703
^^^^^
 
704
 
 
705
.. i18n: Objects with States
 
706
.. i18n: ###################
 
707
..
 
708
 
 
709
Objects with States
 
710
###################
 
711
 
 
712
.. i18n:   * The state field, if any, must be at the bottom left corner of the view
 
713
.. i18n:   * Buttons to make the state change at the right of this state field
 
714
..
 
715
 
 
716
  * The state field, if any, must be at the bottom left corner of the view
 
717
  * Buttons to make the state change at the right of this state field
 
718
 
 
719
.. i18n: Search Criterions
 
720
.. i18n: #################
 
721
..
 
722
 
 
723
Search Criterions
 
724
#################
 
725
 
 
726
.. i18n: Search criterions: search available on all columns of the list view
 
727
..
 
728
 
 
729
Search criterions: search available on all columns of the list view
 
730
 
 
731
.. i18n: Action Names
 
732
.. i18n: ^^^^^^^^^^^^
 
733
..
 
734
 
 
735
Action Names
 
736
^^^^^^^^^^^^
 
737
 
 
738
.. i18n: .. todo:: write 'Action Names' section
 
739
..
 
740
 
 
741
.. todo:: write 'Action Names' section
 
742
 
 
743
.. i18n: Wizards
 
744
.. i18n: ^^^^^^^
 
745
..
 
746
 
 
747
Wizards
 
748
^^^^^^^
 
749
 
 
750
.. i18n: Terminology
 
751
.. i18n: """""""""""
 
752
..
 
753
 
 
754
Terminology
 
755
"""""""""""
 
756
 
 
757
.. i18n: Default Language
 
758
.. i18n: ^^^^^^^^^^^^^^^^
 
759
..
 
760
 
 
761
Default Language
 
762
^^^^^^^^^^^^^^^^
 
763
 
 
764
.. i18n: The default language for every development must be U.S. english.
 
765
..
 
766
 
 
767
The default language for every development must be U.S. english.
 
768
 
 
769
.. i18n: For menus and fields, use uppercase for all first letters, excluding conjections:
 
770
..
 
771
 
 
772
For menus and fields, use uppercase for all first letters, excluding conjections:
 
773
 
 
774
.. i18n:   * Chart of Accounts
 
775
..
 
776
 
 
777
  * Chart of Accounts
 
778
 
 
779
.. i18n: Field Naming Conventions
 
780
.. i18n: ^^^^^^^^^^^^^^^^^^^^^^^^
 
781
..
 
782
 
 
783
Field Naming Conventions
 
784
^^^^^^^^^^^^^^^^^^^^^^^^
 
785
 
 
786
.. i18n:   * Avoid generic terms in fields and use if possible explicit terms, some example:
 
787
.. i18n: 
 
788
.. i18n:     - Name -> Sale Order Name
 
789
.. i18n:     - Parent -> Bill of Material Parent
 
790
.. i18n:     - Rate -> Currency Rate Conversion
 
791
.. i18n:     - Amount -> Quantity Sold
 
792
..
 
793
 
 
794
  * Avoid generic terms in fields and use if possible explicit terms, some example:
 
795
 
 
796
    - Name -> Sale Order Name
 
797
    - Parent -> Bill of Material Parent
 
798
    - Rate -> Currency Rate Conversion
 
799
    - Amount -> Quantity Sold
 
800
 
 
801
.. i18n: Here are some rules to respect:
 
802
..
 
803
 
 
804
Here are some rules to respect:
 
805
 
 
806
.. i18n: * many2one fields should respect this regex: '.*_id'
 
807
.. i18n: * one2many fields should respect this regex: '.*_ids'
 
808
.. i18n: * one2many relation table should respect this regex: '.*_rel'
 
809
.. i18n: * many2many fields should respect this regex: '.*_ids'
 
810
.. i18n: * use underscore to separate words
 
811
.. i18n: * avoid using uppercases
 
812
.. i18n: * if a field should be composed of several words, start by the most important words
 
813
.. i18n: 
 
814
.. i18n:    * This is good: sale_price, partner_address_id
 
815
.. i18n:    * This is bad: is_sellable
 
816
..
 
817
 
 
818
* many2one fields should respect this regex: '.*_id'
 
819
* one2many fields should respect this regex: '.*_ids'
 
820
* one2many relation table should respect this regex: '.*_rel'
 
821
* many2many fields should respect this regex: '.*_ids'
 
822
* use underscore to separate words
 
823
* avoid using uppercases
 
824
* if a field should be composed of several words, start by the most important words
 
825
 
 
826
   * This is good: sale_price, partner_address_id
 
827
   * This is bad: is_sellable
 
828
 
 
829
.. i18n: Object Naming Conventions
 
830
.. i18n: ^^^^^^^^^^^^^^^^^^^^^^^^^
 
831
..
 
832
 
 
833
Object Naming Conventions
 
834
^^^^^^^^^^^^^^^^^^^^^^^^^
 
835
 
 
836
.. i18n: * All objects must start by the name of the module they are defined in.
 
837
.. i18n: * If an object is composed of several words, use points to separate words
 
838
..
 
839
 
 
840
* All objects must start by the name of the module they are defined in.
 
841
* If an object is composed of several words, use points to separate words
 
842
 
 
843
.. i18n: Some terms
 
844
.. i18n: ^^^^^^^^^^
 
845
..
 
846
 
 
847
Some terms
 
848
^^^^^^^^^^
 
849
 
 
850
.. i18n:   * All Tree of resources are called *XXX's Structure*, unless a dedicated term exist for the concept
 
851
.. i18n: 
 
852
.. i18n:     - Good: Location' Structure, Chart of Accounts, Categories' Structure
 
853
.. i18n:     - Bad: Tree of Category, Tree of Bill of Materials
 
854
..
 
855
 
 
856
  * All Tree of resources are called *XXX's Structure*, unless a dedicated term exist for the concept
 
857
 
 
858
    - Good: Location' Structure, Chart of Accounts, Categories' Structure
 
859
    - Bad: Tree of Category, Tree of Bill of Materials
 
860
 
 
861
.. i18n: Module Recorder
 
862
.. i18n: +++++++++++++++
 
863
..
 
864
 
 
865
Module Recorder
 
866
+++++++++++++++
 
867
 
 
868
.. i18n: .. todo:: write 'Module Recorder' section
 
869
..
 
870
 
 
871
.. todo:: write 'Module Recorder' section
 
872
 
 
873
.. i18n: Review quality
 
874
.. i18n: ++++++++++++++
 
875
..
 
876
 
 
877
Review quality
 
878
++++++++++++++
 
879
 
 
880
.. i18n:        - You can check your module quality using "base_module_quality" module available on stable addons
 
881
..
 
882
 
 
883
        - You can check your module quality using "base_module_quality" module available on stable addons