author | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> |
Thu, 14 May 2009 11:38:40 +0200 | |
branch | tls-sprint |
changeset 1802 | d628defebc17 |
parent 0 | b97547f5f1fa |
child 1977 | 606923dff11b |
permissions | -rw-r--r-- |
0 | 1 |
class Societe(EntityType): |
2 |
permissions = { |
|
3 |
'read': ('managers', 'users', 'guests'), |
|
4 |
'update': ('managers', 'owners', ERQLExpression('U login L, X nom L')), |
|
5 |
'delete': ('managers', 'owners', ERQLExpression('U login L, X nom L')), |
|
6 |
'add': ('managers', 'users',) |
|
7 |
} |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
8 |
|
0 | 9 |
nom = String(maxsize=64, fulltextindexed=True) |
10 |
web = String(maxsize=128) |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
11 |
type = String(maxsize=128) # attribute in common with Note |
0 | 12 |
tel = Int() |
13 |
fax = Int() |
|
14 |
rncs = String(maxsize=128) |
|
15 |
ad1 = String(maxsize=128) |
|
16 |
ad2 = String(maxsize=128) |
|
17 |
ad3 = String(maxsize=128) |
|
18 |
cp = String(maxsize=12) |
|
19 |
ville= String(maxsize=32) |
|
20 |
||
21 |
||
22 |
class travaille(RelationType): |
|
23 |
permissions = { |
|
24 |
'read': ('managers', 'users', 'guests'), |
|
25 |
'add': ('managers', RRQLExpression('U has_update_permission S')), |
|
26 |
'delete': ('managers', RRQLExpression('O owned_by U')), |
|
27 |
} |
|
28 |
||
29 |
||
30 |
class Division(Societe): |
|
31 |
__specializes_schema__ = True |
|
32 |
||
33 |
class SubDivision(Division): |
|
34 |
__specializes_schema__ = True |
|
35 |
travaille_subdivision = ObjectRelation('Personne') |