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

« back to all changes in this revision

Viewing changes to i18n/ru/source/book/8/8_20_Config/8_20_Config_accessRights.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: .. index::
 
3
.. i18n:    single: access rights
 
4
.. i18n:    single: access; user
 
5
..
 
6
 
 
7
.. index::
 
8
   single: access rights
 
9
   single: access; user
 
10
 
 
11
.. i18n: User Login
 
12
.. i18n: ==========
 
13
..
 
14
 
 
15
User Login
 
16
==========
 
17
 
 
18
.. i18n: .. tip:: Managing Passwords
 
19
.. i18n: 
 
20
.. i18n:    If you let users change their passwords for themselves you'll have no direct control over the
 
21
.. i18n:    password they choose.
 
22
.. i18n:    You should have a written policy about password strength to try to maintain a level of security in
 
23
.. i18n:    your system.
 
24
..
 
25
 
 
26
.. tip:: Managing Passwords
 
27
 
 
28
   If you let users change their passwords for themselves you'll have no direct control over the
 
29
   password they choose.
 
30
   You should have a written policy about password strength to try to maintain a level of security in
 
31
   your system.
 
32
 
 
33
.. i18n: .. index::
 
34
.. i18n:    single: module; users_ldap
 
35
..
 
36
 
 
37
.. index::
 
38
   single: module; users_ldap
 
39
 
 
40
.. i18n: .. tip:: Managing users through LDAP
 
41
.. i18n: 
 
42
.. i18n:        With the :mod:`users_ldap` module, user accounts can be managed through an LDAP directory that can be
 
43
.. i18n:        made common to various different company resources.
 
44
.. i18n: 
 
45
.. i18n:        Connection parameters for the LDAP directory are then registered with the company definition.
 
46
.. i18n:        You can provide a user profile template there from which new users are automatically created during
 
47
.. i18n:        their first connection to Open ERP.
 
48
..
 
49
 
 
50
.. tip:: Managing users through LDAP
 
51
 
 
52
        With the :mod:`users_ldap` module, user accounts can be managed through an LDAP directory that can be
 
53
        made common to various different company resources.
 
54
 
 
55
        Connection parameters for the LDAP directory are then registered with the company definition.
 
56
        You can provide a user profile template there from which new users are automatically created during
 
57
        their first connection to Open ERP.
 
58
 
 
59
.. i18n: .. index::
 
60
.. i18n:    single: LDAP
 
61
..
 
62
 
 
63
.. index::
 
64
   single: LDAP
 
65
 
 
66
.. i18n: .. note:: LDAP
 
67
.. i18n: 
 
68
.. i18n:        The LDAP protocol (Lightweight Directory Access Protocol) enables you to manage common directories
 
69
.. i18n:        for various different resources through your standard TCP/IP network.
 
70
.. i18n: 
 
71
.. i18n:        This enables users in the company to have the same username and password to access all
 
72
.. i18n:        their applications (such as email and intranet).
 
73
..
 
74
 
 
75
.. note:: LDAP
 
76
 
 
77
        The LDAP protocol (Lightweight Directory Access Protocol) enables you to manage common directories
 
78
        for various different resources through your standard TCP/IP network.
 
79
 
 
80
        This enables users in the company to have the same username and password to access all
 
81
        their applications (such as email and intranet).
 
82
 
 
83
.. i18n: Managing access rights
 
84
.. i18n: ======================
 
85
..
 
86
 
 
87
Managing access rights
 
88
======================
 
89
 
 
90
.. i18n: One of the most important areas in configuring Open ERP is how to manage access rights to the
 
91
.. i18n: information in it.
 
92
..
 
93
 
 
94
One of the most important areas in configuring Open ERP is how to manage access rights to the
 
95
information in it.
 
96
 
 
97
.. i18n: You're planning to put everything significant to your business into the system, but most of your
 
98
.. i18n: staff need see only part of it, and may need to change even less of it. Who should have rights to
 
99
.. i18n: what, and how do you manage that?
 
100
..
 
101
 
 
102
You're planning to put everything significant to your business into the system, but most of your
 
103
staff need see only part of it, and may need to change even less of it. Who should have rights to
 
104
what, and how do you manage that?
 
105
 
 
106
.. i18n: OpenERP's approach to rights management is highly flexible. Each user can belong to one or more
 
107
.. i18n: groups, and the group(s) you belong to determine(s):
 
108
..
 
109
 
 
110
OpenERP's approach to rights management is highly flexible. Each user can belong to one or more
 
111
groups, and the group(s) you belong to determine(s):
 
112
 
 
113
.. i18n: * the visibility of each menu item and
 
114
.. i18n: 
 
115
.. i18n: * the accessibility of each table in the database.
 
116
..
 
117
 
 
118
* the visibility of each menu item and
 
119
 
 
120
* the accessibility of each table in the database.
 
121
 
 
122
.. i18n: For example, the group \ ``Stock``\ may only be given access to some of the menus in
 
123
.. i18n: :menuselection:`Stock Management`, and may have no access to any of the accounting information. Each system user who works in
 
124
.. i18n: Stores is given membership of the ``Stock`` group. If some users also work elsewhere, they'd also be
 
125
.. i18n: given membership of other groups.
 
126
..
 
127
 
 
128
For example, the group \ ``Stock``\ may only be given access to some of the menus in
 
129
:menuselection:`Stock Management`, and may have no access to any of the accounting information. Each system user who works in
 
130
Stores is given membership of the ``Stock`` group. If some users also work elsewhere, they'd also be
 
131
given membership of other groups.
 
132
 
 
133
.. i18n: Open ERP users can also belong to various roles. Just as group gives a user access rights, each
 
134
.. i18n: role determines the user's duties. This is managed at the level of workflows, which form the
 
135
.. i18n: company's business processes.
 
136
..
 
137
 
 
138
Open ERP users can also belong to various roles. Just as group gives a user access rights, each
 
139
role determines the user's duties. This is managed at the level of workflows, which form the
 
140
company's business processes.
 
141
 
 
142
.. i18n: .. index::
 
143
.. i18n:    pair: user; group
 
144
..
 
145
 
 
146
.. index::
 
147
   pair: user; group
 
148
 
 
149
.. i18n: Groups and Users
 
150
.. i18n: ================
 
151
..
 
152
 
 
153
Groups and Users
 
154
================
 
155
 
 
156
.. i18n: To configure access rights you'd start by defining the groups. It's important for the groups to
 
157
.. i18n: be representative of your company's job functions rather than of its individual employees.
 
158
..
 
159
 
 
160
To configure access rights you'd start by defining the groups. It's important for the groups to
 
161
be representative of your company's job functions rather than of its individual employees.
 
162
 
 
163
.. i18n: So if your finance director is also your sales director, you should create both a Finance Director
 
164
.. i18n: group and a Sales Director group, even though they're both the same person, and would both be
 
165
.. i18n: assigned to this user in practice. This gives you flexibility for the future.
 
166
..
 
167
 
 
168
So if your finance director is also your sales director, you should create both a Finance Director
 
169
group and a Sales Director group, even though they're both the same person, and would both be
 
170
assigned to this user in practice. This gives you flexibility for the future.
 
171
 
 
172
.. i18n: You should also create groups within a departmental areas that have different levels of access
 
173
.. i18n: rights. For example, if you create a \ ``Sales Director``\ group and a \ ``Sales``\  group avoid
 
174
.. i18n: assigning exactly the same rights to each group. The first could see all the of reports, while the
 
175
.. i18n: second could be restricted to seeing quotations. You could either make the \ ``Sales Director``\ a
 
176
.. i18n: member of both groups, and give the Sales Director group a limited set of extra rights, or give the
 
177
.. i18n: \ ``Sales Director``\ group all the rights it needs for a Sales Director to belong only to this one
 
178
.. i18n: group. You should choose the scheme that gives you most flexibility and then stick with it to
 
179
.. i18n: maintain consistency.
 
180
..
 
181
 
 
182
You should also create groups within a departmental areas that have different levels of access
 
183
rights. For example, if you create a \ ``Sales Director``\ group and a \ ``Sales``\  group avoid
 
184
assigning exactly the same rights to each group. The first could see all the of reports, while the
 
185
second could be restricted to seeing quotations. You could either make the \ ``Sales Director``\ a
 
186
member of both groups, and give the Sales Director group a limited set of extra rights, or give the
 
187
\ ``Sales Director``\ group all the rights it needs for a Sales Director to belong only to this one
 
188
group. You should choose the scheme that gives you most flexibility and then stick with it to
 
189
maintain consistency.
 
190
 
 
191
.. i18n: .. index::
 
192
.. i18n:    pair:  system; administrator
 
193
..
 
194
 
 
195
.. index::
 
196
   pair:  system; administrator
 
197
 
 
198
.. i18n: .. tip:: Flexibility in managing access
 
199
.. i18n: 
 
200
.. i18n:        To give yourself flexibility, you can ensure that a trusted staff member
 
201
.. i18n:        (perhaps a director or someone in accounts, or even the system administrator) is given wide rights
 
202
.. i18n:        to use the system,
 
203
.. i18n:        and is authorized by the management to carry out specific tasks for people.
 
204
..
 
205
 
 
206
.. tip:: Flexibility in managing access
 
207
 
 
208
        To give yourself flexibility, you can ensure that a trusted staff member
 
209
        (perhaps a director or someone in accounts, or even the system administrator) is given wide rights
 
210
        to use the system,
 
211
        and is authorized by the management to carry out specific tasks for people.
 
212
 
 
213
.. i18n: .. index::
 
214
.. i18n:    single: access; menu
 
215
..
 
216
 
 
217
.. index::
 
218
   single: access; menu
 
219
 
 
220
.. i18n: Access rights for menus
 
221
.. i18n: -----------------------
 
222
..
 
223
 
 
224
Access rights for menus
 
225
-----------------------
 
226
 
 
227
.. i18n: To get a feel for rights management in OpenERP you'll create a new \ ``Stock1``\  group, with
 
228
.. i18n: access to the *Stock Management* menu items. You'll then create a stores person user who's a member
 
229
.. i18n: of the \ ``Stock1``\  group.
 
230
..
 
231
 
 
232
To get a feel for rights management in OpenERP you'll create a new \ ``Stock1``\  group, with
 
233
access to the *Stock Management* menu items. You'll then create a stores person user who's a member
 
234
of the \ ``Stock1``\  group.
 
235
 
 
236
.. i18n: To create a new group, use the menu :menuselection:`Administration --> Users --> Groups`. Enter the
 
237
.. i18n: group name Stock1.
 
238
..
 
239
 
 
240
To create a new group, use the menu :menuselection:`Administration --> Users --> Groups`. Enter the
 
241
group name Stock1.
 
242
 
 
243
.. i18n: Then to create a new user linked to this, use :menuselection:`Administration --> Users --> Users` to
 
244
.. i18n: enter the following:
 
245
..
 
246
 
 
247
Then to create a new user linked to this, use :menuselection:`Administration --> Users --> Users` to
 
248
enter the following:
 
249
 
 
250
.. i18n: *  :guilabel:`Name` : \ ``Stores Person``\  ,
 
251
.. i18n: 
 
252
.. i18n: *  :guilabel:`Username` : \ ``stores``\  ,
 
253
.. i18n: 
 
254
.. i18n: *  :guilabel:`Password` : \ ``stores``\  ,
 
255
.. i18n: 
 
256
.. i18n: *  :guilabel:`Company` : \ ``<your company>``\  ,
 
257
.. i18n: 
 
258
.. i18n: *  :guilabel:`Action` : \ ``Menu``\  ,
 
259
.. i18n: 
 
260
.. i18n: *  :guilabel:`Menu Action` : \ ``Menu``\  .
 
261
..
 
262
 
 
263
*  :guilabel:`Name` : \ ``Stores Person``\  ,
 
264
 
 
265
*  :guilabel:`Username` : \ ``stores``\  ,
 
266
 
 
267
*  :guilabel:`Password` : \ ``stores``\  ,
 
268
 
 
269
*  :guilabel:`Company` : \ ``<your company>``\  ,
 
270
 
 
271
*  :guilabel:`Action` : \ ``Menu``\  ,
 
272
 
 
273
*  :guilabel:`Menu Action` : \ ``Menu``\  .
 
274
 
 
275
.. i18n: In the second tab of the user form, :guilabel:`Security` , add the \ ``Stock1``\   group that you
 
276
.. i18n: just created.
 
277
..
 
278
 
 
279
In the second tab of the user form, :guilabel:`Security` , add the \ ``Stock1``\   group that you
 
280
just created.
 
281
 
 
282
.. i18n: .. figure::  images/menu_access.png
 
283
.. i18n:    :scale: 75
 
284
.. i18n:    :align: center
 
285
.. i18n: 
 
286
.. i18n:    *Groups that have access to the Stock Management menu*
 
287
..
 
288
 
 
289
.. figure::  images/menu_access.png
 
290
   :scale: 75
 
291
   :align: center
 
292
 
 
293
   *Groups that have access to the Stock Management menu*
 
294
 
 
295
.. i18n: Save the user, then go into the menu :menuselection:`Administration --> Security --> Grant Access
 
296
.. i18n: to Menus` to get a list of menus. Filter this list using the search field :guilabel:`Menu`  to
 
297
.. i18n: get the :menuselection:`Stock Management` menu item. In the form describing the menu, add \ ``Stock1``\
 
298
.. i18n: into the :guilabel:`Groups` field. While you're at it, also add the \ ``admin``\   group there. From
 
299
.. i18n: now on, only members of the \ ``Stock1``\   group and the \ ``admin``\   group will be able to see
 
300
.. i18n: this menu item in their main menu list.
 
301
..
 
302
 
 
303
Save the user, then go into the menu :menuselection:`Administration --> Security --> Grant Access
 
304
to Menus` to get a list of menus. Filter this list using the search field :guilabel:`Menu`  to
 
305
get the :menuselection:`Stock Management` menu item. In the form describing the menu, add \ ``Stock1``\
 
306
into the :guilabel:`Groups` field. While you're at it, also add the \ ``admin``\   group there. From
 
307
now on, only members of the \ ``Stock1``\   group and the \ ``admin``\   group will be able to see
 
308
this menu item in their main menu list.
 
309
 
 
310
.. i18n: .. tip:: Menu hierarchy
 
311
.. i18n: 
 
312
.. i18n:        Since menus are hierarchical there is no need to hide access to lower menus:
 
313
.. i18n:        once you've configured :menuselection:`Stock Management` this way, all lower-level menus become invisible to
 
314
.. i18n:        members of other groups.
 
315
..
 
316
 
 
317
.. tip:: Menu hierarchy
 
318
 
 
319
        Since menus are hierarchical there is no need to hide access to lower menus:
 
320
        once you've configured :menuselection:`Stock Management` this way, all lower-level menus become invisible to
 
321
        members of other groups.
 
322
 
 
323
.. i18n: .. tip:: Security
 
324
.. i18n: 
 
325
.. i18n:        This method of managing access to menus doesn't guarantee that users are prevented from reaching
 
326
.. i18n:        hidden business objects in the system in other ways.
 
327
.. i18n:        For example, hiding the Invoices menu won't prevent people reaching invoices through purchase and
 
328
.. i18n:        sales orders, or by guessing the URL.
 
329
.. i18n: 
 
330
.. i18n:        For effective security management you must use the methods for managing access rights to objects
 
331
.. i18n:        presented in the following section.
 
332
..
 
333
 
 
334
.. tip:: Security
 
335
 
 
336
        This method of managing access to menus doesn't guarantee that users are prevented from reaching
 
337
        hidden business objects in the system in other ways.
 
338
        For example, hiding the Invoices menu won't prevent people reaching invoices through purchase and
 
339
        sales orders, or by guessing the URL.
 
340
 
 
341
        For effective security management you must use the methods for managing access rights to objects
 
342
        presented in the following section.
 
343
 
 
344
.. i18n: .. note:: Initial access configuration
 
345
.. i18n: 
 
346
.. i18n:        In the initial configuration, Open ERP's admin user, a member of the admin group, is given access
 
347
.. i18n:        to the Configuration menu
 
348
.. i18n:        in each section of the main menu. This is a general convention.
 
349
.. i18n:        For example, :menuselection:`Partners --> Configuration` is visible in the administrator's menu
 
350
.. i18n:        amongst the other Partner menu items,
 
351
.. i18n:        but only those other menu entries are visible to other users.
 
352
.. i18n:        Similarly, the main menu entry :menuselection:`Administration` is, by convention, visible only to
 
353
.. i18n:        users who are members of the admin group.
 
354
..
 
355
 
 
356
.. note:: Initial access configuration
 
357
 
 
358
        In the initial configuration, Open ERP's admin user, a member of the admin group, is given access
 
359
        to the Configuration menu
 
360
        in each section of the main menu. This is a general convention.
 
361
        For example, :menuselection:`Partners --> Configuration` is visible in the administrator's menu
 
362
        amongst the other Partner menu items,
 
363
        but only those other menu entries are visible to other users.
 
364
        Similarly, the main menu entry :menuselection:`Administration` is, by convention, visible only to
 
365
        users who are members of the admin group.
 
366
 
 
367
.. i18n: .. index::
 
368
.. i18n:    single: access; objects
 
369
..
 
370
 
 
371
.. index::
 
372
   single: access; objects
 
373
 
 
374
.. i18n: Access Rights to Objects
 
375
.. i18n: ------------------------
 
376
..
 
377
 
 
378
Access Rights to Objects
 
379
------------------------
 
380
 
 
381
.. i18n: The menu access rights determine who can access which menu, but doesn't define what you can do once
 
382
.. i18n: you're in the menu.
 
383
..
 
384
 
 
385
The menu access rights determine who can access which menu, but doesn't define what you can do once
 
386
you're in the menu.
 
387
 
 
388
.. i18n: Access controls on the objects give you the possibility of defining what your users have the right
 
389
.. i18n: to do with your data when they get access to it. Access control of objects is structured the same
 
390
.. i18n: way as access to menus.
 
391
..
 
392
 
 
393
Access controls on the objects give you the possibility of defining what your users have the right
 
394
to do with your data when they get access to it. Access control of objects is structured the same
 
395
way as access to menus.
 
396
 
 
397
.. i18n: .. note:: Object
 
398
.. i18n: 
 
399
.. i18n:    An object represents a document in the system.
 
400
.. i18n:    Objects are linked to database tables and also have additional concepts,
 
401
.. i18n:    such as the functions of fields, inheritance from other objects, and class methods that give them
 
402
.. i18n:    behavior.
 
403
..
 
404
 
 
405
.. note:: Object
 
406
 
 
407
   An object represents a document in the system.
 
408
   Objects are linked to database tables and also have additional concepts,
 
409
   such as the functions of fields, inheritance from other objects, and class methods that give them
 
410
   behavior.
 
411
 
 
412
.. i18n: If no group is assigned to an object, all users can access it without any restriction of any sort.
 
413
.. i18n: Conversely, when an access control is defined for an object, a user must be a member of a group
 
414
.. i18n: owning appropriate access rights to have any sort of access to that object.
 
415
..
 
416
 
 
417
If no group is assigned to an object, all users can access it without any restriction of any sort.
 
418
Conversely, when an access control is defined for an object, a user must be a member of a group
 
419
owning appropriate access rights to have any sort of access to that object.
 
420
 
 
421
.. i18n: You must always ensure that you don't lock the \ ``admin``\ group out of any objects that control
 
422
.. i18n: administration and configuration options, such as the \ ``ir.model.access``\   model.
 
423
..
 
424
 
 
425
You must always ensure that you don't lock the \ ``admin``\ group out of any objects that control
 
426
administration and configuration options, such as the \ ``ir.model.access``\   model.
 
427
 
 
428
.. i18n: You can manage four access modes on objects independently:
 
429
..
 
430
 
 
431
You can manage four access modes on objects independently:
 
432
 
 
433
.. i18n: *  :guilabel:`Read access` : members of the group can read the data in the object,
 
434
.. i18n: 
 
435
.. i18n: *  :guilabel:`Create access` : members of the group can create a new record in the object,
 
436
.. i18n: 
 
437
.. i18n: *  :guilabel:`Write access` : members of the group can modify the contents of records in the object,
 
438
.. i18n: 
 
439
.. i18n: *  :guilabel:`Delete access` : members of the group can delete records from the object.
 
440
..
 
441
 
 
442
*  :guilabel:`Read access` : members of the group can read the data in the object,
 
443
 
 
444
*  :guilabel:`Create access` : members of the group can create a new record in the object,
 
445
 
 
446
*  :guilabel:`Write access` : members of the group can modify the contents of records in the object,
 
447
 
 
448
*  :guilabel:`Delete access` : members of the group can delete records from the object.
 
449
 
 
450
.. i18n: .. figure::  images/access_control.png
 
451
.. i18n:    :scale: 75
 
452
.. i18n:    :align: center
 
453
.. i18n: 
 
454
.. i18n:    *Access control to invoices for the Finance/Admin group*
 
455
..
 
456
 
 
457
.. figure::  images/access_control.png
 
458
   :scale: 75
 
459
   :align: center
 
460
 
 
461
   *Access control to invoices for the Finance/Admin group*
 
462
 
 
463
.. i18n: To configure access rights on a Open ERP objects, use the menu :menuselection:`Administration -->
 
464
.. i18n: Security --> Access Controls --> Access Controls List` and click :guilabel:`New` or choose one there
 
465
.. i18n: and click :guilabel:`Edit`.
 
466
.. i18n: You give a :guilabel:`Name` to the access control, select a :guilabel:`Group`, and
 
467
.. i18n: the object (:guilabel:`Model`), then check the checkbox corresponding to each of the four :guilabel:`Access` modes.
 
468
..
 
469
 
 
470
To configure access rights on a Open ERP objects, use the menu :menuselection:`Administration -->
 
471
Security --> Access Controls --> Access Controls List` and click :guilabel:`New` or choose one there
 
472
and click :guilabel:`Edit`.
 
473
You give a :guilabel:`Name` to the access control, select a :guilabel:`Group`, and
 
474
the object (:guilabel:`Model`), then check the checkbox corresponding to each of the four :guilabel:`Access` modes.
 
475
 
 
476
.. i18n: If you don't specify any group in the access rules, the rule is applied to all groups. So to remove
 
477
.. i18n: access to an object for all users you could create a rule:
 
478
..
 
479
 
 
480
If you don't specify any group in the access rules, the rule is applied to all groups. So to remove
 
481
access to an object for all users you could create a rule:
 
482
 
 
483
.. i18n: * which is defined for a specific object,
 
484
.. i18n: 
 
485
.. i18n: * which is linked to no group,
 
486
.. i18n: 
 
487
.. i18n: * for which none of the four access options is checked.
 
488
..
 
489
 
 
490
* which is defined for a specific object,
 
491
 
 
492
* which is linked to no group,
 
493
 
 
494
* for which none of the four access options is checked.
 
495
 
 
496
.. i18n: You can then create additional rules on the same object to give specific rights to certain groups.
 
497
..
 
498
 
 
499
You can then create additional rules on the same object to give specific rights to certain groups.
 
500
 
 
501
.. i18n: .. index::
 
502
.. i18n:    single: record
 
503
..
 
504
 
 
505
.. index::
 
506
   single: record
 
507
 
 
508
.. i18n: Record Rules For Objects
 
509
.. i18n: ------------------------
 
510
..
 
511
 
 
512
Record Rules For Objects
 
513
------------------------
 
514
 
 
515
.. i18n: Record rules determine who can access the objects depending on the rules set for the particular object. A record rule has some tests to be performed on objects.
 
516
..
 
517
 
 
518
Record rules determine who can access the objects depending on the rules set for the particular object. A record rule has some tests to be performed on objects.
 
519
 
 
520
.. i18n: You can manage four access modes on objects independently depending on the test:
 
521
..
 
522
 
 
523
You can manage four access modes on objects independently depending on the test:
 
524
 
 
525
.. i18n:     * :guilabel:`Read access` : can read the data in the object,
 
526
.. i18n: 
 
527
.. i18n:     * :guilabel:`Create access` : can create a new record in the object,
 
528
.. i18n: 
 
529
.. i18n:     * :guilabel:`Write access` : can modify the contents of records in the object,
 
530
.. i18n: 
 
531
.. i18n:     * :guilabel:`Delete access` : can delete records from the object.
 
532
..
 
533
 
 
534
    * :guilabel:`Read access` : can read the data in the object,
 
535
 
 
536
    * :guilabel:`Create access` : can create a new record in the object,
 
537
 
 
538
    * :guilabel:`Write access` : can modify the contents of records in the object,
 
539
 
 
540
    * :guilabel:`Delete access` : can delete records from the object.
 
541
 
 
542
.. i18n: To configure rule on object, use the menu :menuselection:`Administration -->
 
543
.. i18n: Security --> Record Rules`. The fields in the ``ir.rule`` object describe:
 
544
..
 
545
 
 
546
To configure rule on object, use the menu :menuselection:`Administration -->
 
547
Security --> Record Rules`. The fields in the ``ir.rule`` object describe:
 
548
 
 
549
.. i18n:     * :guilabel:`Object` : Object on which to have the rule
 
550
.. i18n: 
 
551
.. i18n:     * :guilabel:`Name` : Name of the rule
 
552
.. i18n: 
 
553
.. i18n:     * :guilabel:`Global` : If global is checked then that rule would be applied for all the groups and if it is unchecked then that rule would be applied only for the groups selected for it
 
554
.. i18n: 
 
555
.. i18n:     * :guilabel:`Test` : A list of all the tests for the object
 
556
.. i18n: 
 
557
.. i18n:             * If there are mulitple tests on same object then all of them are joined using ``AND`` operator and depending on the result the rule would be satisfied
 
558
.. i18n: 
 
559
.. i18n:             * If there are multiple rules on same object then all of them are joined using ``OR`` operator
 
560
.. i18n: 
 
561
.. i18n:     * :guilabel:`Access Modes` : Read, Write, Create, Delete as described earlier
 
562
.. i18n: 
 
563
.. i18n:             * If only one access mode is checked, then only that mode would be applied
 
564
.. i18n: 
 
565
.. i18n:             * If all of them are checked then all the access modes would be applied
 
566
..
 
567
 
 
568
    * :guilabel:`Object` : Object on which to have the rule
 
569
 
 
570
    * :guilabel:`Name` : Name of the rule
 
571
 
 
572
    * :guilabel:`Global` : If global is checked then that rule would be applied for all the groups and if it is unchecked then that rule would be applied only for the groups selected for it
 
573
 
 
574
    * :guilabel:`Test` : A list of all the tests for the object
 
575
 
 
576
            * If there are mulitple tests on same object then all of them are joined using ``AND`` operator and depending on the result the rule would be satisfied
 
577
 
 
578
            * If there are multiple rules on same object then all of them are joined using ``OR`` operator
 
579
 
 
580
    * :guilabel:`Access Modes` : Read, Write, Create, Delete as described earlier
 
581
 
 
582
            * If only one access mode is checked, then only that mode would be applied
 
583
 
 
584
            * If all of them are checked then all the access modes would be applied
 
585
 
 
586
.. i18n:         But at least one access mode has to be checked, all of them can not be unchecked. If all of them are unchecked it would raise exception.
 
587
..
 
588
 
 
589
        But at least one access mode has to be checked, all of them can not be unchecked. If all of them are unchecked it would raise exception.
 
590
 
 
591
.. i18n: .. .. figure:: images/security_rule.png
 
592
.. i18n: ..    :scale: 75
 
593
.. i18n: ..    :align: center
 
594
..
 
595
 
 
596
.. .. figure:: images/security_rule.png
 
597
..    :scale: 75
 
598
..    :align: center
 
599
 
 
600
.. i18n: *For eg :* If we have a rule defined on ``res.partner`` object which tests if the user is the dedicated salesman of the partner ``[('user_id', '=', User)]``. We check only the create and write access mode and keep other access modes unchecked.
 
601
..
 
602
 
 
603
*For eg :* If we have a rule defined on ``res.partner`` object which tests if the user is the dedicated salesman of the partner ``[('user_id', '=', User)]``. We check only the create and write access mode and keep other access modes unchecked.
 
604
 
 
605
.. i18n: So this means that a user in the group for which the rule is applied can only create/write records where he himself serves as the dedicated salesman and can not create/write records where he is not the dedicated salesman. As other access modes are unchecked the user can read/delete the records of partners where he is not the dedicated salesman.
 
606
..
 
607
 
 
608
So this means that a user in the group for which the rule is applied can only create/write records where he himself serves as the dedicated salesman and can not create/write records where he is not the dedicated salesman. As other access modes are unchecked the user can read/delete the records of partners where he is not the dedicated salesman.
 
609
 
 
610
.. i18n: .. note:: Currently record rules are enforced for all operations (read, create, write, delete). But the above described feature is new for version 5.2.
 
611
..
 
612
 
 
613
.. note:: Currently record rules are enforced for all operations (read, create, write, delete). But the above described feature is new for version 5.2.
 
614
 
 
615
.. i18n: .. index::
 
616
.. i18n:    single: modification history
 
617
..
 
618
 
 
619
.. index::
 
620
   single: modification history
 
621
 
 
622
.. i18n: Modification history
 
623
.. i18n: --------------------
 
624
..
 
625
 
 
626
Modification history
 
627
--------------------
 
628
 
 
629
.. i18n: .. figure::  images/view_log.png
 
630
.. i18n:    :scale: 75
 
631
.. i18n:    :align: center
 
632
.. i18n: 
 
633
.. i18n:    *Partner Record history*
 
634
..
 
635
 
 
636
.. figure::  images/view_log.png
 
637
   :scale: 75
 
638
   :align: center
 
639
 
 
640
   *Partner Record history*
 
641
 
 
642
.. i18n: Each record in a OpenERP database carries a note of its history. You can find out who it was
 
643
.. i18n: created by and when that occurred, and who last modified it and when that occurred. Click the
 
644
.. i18n: :guilabel:`View Log` icon at the top right of any form in the web client (but only when it's read-
 
645
.. i18n: only, not when it's editable) to display a dialog box showing this information, as shown in the
 
646
.. i18n: figure :ref:`fig-sflow`. It can help you identify who to contact if there are any problems with the
 
647
.. i18n: data in the records.
 
648
..
 
649
 
 
650
Each record in a OpenERP database carries a note of its history. You can find out who it was
 
651
created by and when that occurred, and who last modified it and when that occurred. Click the
 
652
:guilabel:`View Log` icon at the top right of any form in the web client (but only when it's read-
 
653
only, not when it's editable) to display a dialog box showing this information, as shown in the
 
654
figure :ref:`fig-sflow`. It can help you identify who to contact if there are any problems with the
 
655
data in the records.
 
656
 
 
657
.. i18n: .. index::
 
658
.. i18n:    single: module; audittrail
 
659
..
 
660
 
 
661
.. index::
 
662
   single: module; audittrail
 
663
 
 
664
.. i18n: .. tip:: Audit Trail
 
665
.. i18n: 
 
666
.. i18n:    OpenERP has an Audit Trail module :mod:`audittrail` which can be used to track any or
 
667
.. i18n:    all of the changes to one or more objects. It should be used with care, because it
 
668
.. i18n:    can generate huge amounts of data in the live database, but can be an invaluable
 
669
.. i18n:    tool.
 
670
..
 
671
 
 
672
.. tip:: Audit Trail
 
673
 
 
674
   OpenERP has an Audit Trail module :mod:`audittrail` which can be used to track any or
 
675
   all of the changes to one or more objects. It should be used with care, because it
 
676
   can generate huge amounts of data in the live database, but can be an invaluable
 
677
   tool.
 
678
 
 
679
.. i18n: .. Copyright © Open Object Press. All rights reserved.
 
680
..
 
681
 
 
682
.. Copyright © Open Object Press. All rights reserved.
 
683
 
 
684
.. i18n: .. You may take electronic copy of this publication and distribute it if you don't
 
685
.. i18n: .. change the content. You can also print a copy to be read by yourself only.
 
686
..
 
687
 
 
688
.. You may take electronic copy of this publication and distribute it if you don't
 
689
.. change the content. You can also print a copy to be read by yourself only.
 
690
 
 
691
.. i18n: .. We have contracts with different publishers in different countries to sell and
 
692
.. i18n: .. distribute paper or electronic based versions of this book (translated or not)
 
693
.. i18n: .. in bookstores. This helps to distribute and promote the OpenERP product. It
 
694
.. i18n: .. also helps us to create incentives to pay contributors and authors using author
 
695
.. i18n: .. rights of these sales.
 
696
..
 
697
 
 
698
.. We have contracts with different publishers in different countries to sell and
 
699
.. distribute paper or electronic based versions of this book (translated or not)
 
700
.. in bookstores. This helps to distribute and promote the OpenERP product. It
 
701
.. also helps us to create incentives to pay contributors and authors using author
 
702
.. rights of these sales.
 
703
 
 
704
.. i18n: .. Due to this, grants to translate, modify or sell this book are strictly
 
705
.. i18n: .. forbidden, unless Tiny SPRL (representing Open Object Press) gives you a
 
706
.. i18n: .. written authorisation for this.
 
707
..
 
708
 
 
709
.. Due to this, grants to translate, modify or sell this book are strictly
 
710
.. forbidden, unless Tiny SPRL (representing Open Object Press) gives you a
 
711
.. written authorisation for this.
 
712
 
 
713
.. i18n: .. Many of the designations used by manufacturers and suppliers to distinguish their
 
714
.. i18n: .. products are claimed as trademarks. Where those designations appear in this book,
 
715
.. i18n: .. and Open Object Press was aware of a trademark claim, the designations have been
 
716
.. i18n: .. printed in initial capitals.
 
717
..
 
718
 
 
719
.. Many of the designations used by manufacturers and suppliers to distinguish their
 
720
.. products are claimed as trademarks. Where those designations appear in this book,
 
721
.. and Open Object Press was aware of a trademark claim, the designations have been
 
722
.. printed in initial capitals.
 
723
 
 
724
.. i18n: .. While every precaution has been taken in the preparation of this book, the publisher
 
725
.. i18n: .. and the authors assume no responsibility for errors or omissions, or for damages
 
726
.. i18n: .. resulting from the use of the information contained herein.
 
727
..
 
728
 
 
729
.. While every precaution has been taken in the preparation of this book, the publisher
 
730
.. and the authors assume no responsibility for errors or omissions, or for damages
 
731
.. resulting from the use of the information contained herein.
 
732
 
 
733
.. i18n: .. Published by Open Object Press, Grand Rosière, Belgium
 
734
..
 
735
 
 
736
.. Published by Open Object Press, Grand Rosière, Belgium