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

« back to all changes in this revision

Viewing changes to i18n/ru/source/contribute/15_guidelines/documentation_guidelines.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: .. _documentation-guidelines-link:
 
3
.. i18n: 
 
4
.. i18n: ========================
 
5
.. i18n: Documentation Guidelines
 
6
.. i18n: ========================
 
7
..
 
8
 
 
9
.. _documentation-guidelines-link:
 
10
 
 
11
========================
 
12
Documentation Guidelines
 
13
========================
 
14
 
 
15
.. i18n: Useful and concise documentation
 
16
.. i18n: ++++++++++++++++++++++++++++++++
 
17
.. i18n: Every ORM object method takes the same ``self``, ``cr``, ``uid`` parameters
 
18
.. i18n: and usually a list of ``ids`` and an optional ``context``, so it would be
 
19
.. i18n: quite redundant to copy/paste the *obvious* description for these parameters
 
20
.. i18n: every time:
 
21
..
 
22
 
 
23
Useful and concise documentation
 
24
++++++++++++++++++++++++++++++++
 
25
Every ORM object method takes the same ``self``, ``cr``, ``uid`` parameters
 
26
and usually a list of ``ids`` and an optional ``context``, so it would be
 
27
quite redundant to copy/paste the *obvious* description for these parameters
 
28
every time:
 
29
 
 
30
.. i18n: .. code-block:: python
 
31
.. i18n: 
 
32
.. i18n:     def action_send(self, cr, uid, ids, context=None):
 
33
.. i18n:         """ This sends an email to ALL the addresses of the selected partners.
 
34
.. i18n:         @param self: The object pointer
 
35
.. i18n:         @param cr: the current row, from the database cursor,
 
36
.. i18n:         @param uid: the current user ID for security checks
 
37
.. i18n:         @param ids: List of Phonecall to Opportunity's IDs
 
38
.. i18n:         @param context: A standard dictionary for contextual values
 
39
.. i18n:         """
 
40
.. i18n: 
 
41
.. i18n:     def action_send(self, cr, uid, ids, context=None):
 
42
.. i18n:         """ This sends an email to ALL the addresses of the selected partners.
 
43
.. i18n:         @param context['mail']: 'new' to send a new mail or 'reply' if to reply to the last case_history
 
44
.. i18n:         """
 
45
..
 
46
 
 
47
.. code-block:: python
 
48
 
 
49
    def action_send(self, cr, uid, ids, context=None):
 
50
        """ This sends an email to ALL the addresses of the selected partners.
 
51
        @param self: The object pointer
 
52
        @param cr: the current row, from the database cursor,
 
53
        @param uid: the current user ID for security checks
 
54
        @param ids: List of Phonecall to Opportunity's IDs
 
55
        @param context: A standard dictionary for contextual values
 
56
        """
 
57
 
 
58
    def action_send(self, cr, uid, ids, context=None):
 
59
        """ This sends an email to ALL the addresses of the selected partners.
 
60
        @param context['mail']: 'new' to send a new mail or 'reply' if to reply to the last case_history
 
61
        """