source: publico/ILIntranet/trunk/LigacaoInterurbana.py @ 962

Última Alteração nesse arquivo desde 962 foi 962, incluída por jeanferri, 14 anos atrás

Implementados workflows na ligação telefônica da intranet

File size: 6.4 KB
Linha 
1# File: LigacaoInterurbana.py
2#
3# Copyright (c) 2005 by Interlegis
4# Generator: ArchGenXML Version 1.4.0-beta2 devel
5#            http://plone.org/products/archgenxml
6#
7# GNU General Public Licence (GPL)
8#
9# This program is free software; you can redistribute it and/or modify it under
10# the terms of the GNU General Public License as published by the Free Software
11# Foundation; either version 2 of the License, or (at your option) any later
12# version.
13# This program is distributed in the hope that it will be useful, but WITHOUT
14# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
16# details.
17# You should have received a copy of the GNU General Public License along with
18# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19# Place, Suite 330, Boston, MA  02111-1307  USA
20#
21__author__  = '''STC Interlegis <admin-stc@interlegis.gov.br>'''
22__docformat__ = 'plaintext'
23
24
25from AccessControl import ClassSecurityInfo
26from Products.Archetypes.atapi import *
27
28
29
30from Products.Archetypes.SQLStorage import *
31# additional imports from tagged value 'import'
32from DateTime import DateTime
33
34from Products.ILIntranet.config import *
35##code-section module-header #fill in your manual code here
36##/code-section module-header
37
38schema=Schema((
39    StringField('id',
40        widget=IdWidget
41        (
42            visible={'view':'hidden','edit':'hidden'},
43            label='Id',
44            label_msgid='ILIntranet_label_id',
45            description_msgid='ILIntranet_help_id',
46            i18n_domain='ILIntranet',
47        )
48    ),
49
50    StringField('title',
51        widget=StringWidget(
52            visible={'view':'hidden','edit':'hidden'},
53            label='Title',
54            label_msgid='ILIntranet_label_title',
55            description_msgid='ILIntranet_help_title',
56            i18n_domain='ILIntranet',
57        ),
58        required=0
59    ),
60
61    DateTimeField('data_ligacao',
62        index="FieldIndex:schema",
63        widget=CalendarWidget(
64            label="Data",
65            description="Data da ligacao.",
66            label_msgid='ILIntranet_label_data_ligacao',
67            description_msgid='ILIntranet_help_data_ligacao',
68            i18n_domain='ILIntranet',
69        ),
70        required=1,
71        default_method=DateTime
72    ),
73
74    IntegerField('ramal',
75        default='',
76        index=":schema",
77        widget=IntegerWidget(
78            description="Ramal utilizado para a ligacao.",
79            size=4,
80            maxlength=4,
81            label='Ramal',
82            label_msgid='ILIntranet_label_ramal',
83            description_msgid='ILIntranet_help_ramal',
84            i18n_domain='ILIntranet',
85        ),
86        required=1,
87        validators=('isInt',)
88    ),
89
90    StringField('telefone',
91        index=":schema",
92        widget=StringWidget(
93            description="Numero do telefone discado.",
94            size=15,
95            maxlength=15,
96            label='Telefone',
97            label_msgid='ILIntranet_label_telefone',
98            description_msgid='ILIntranet_help_telefone',
99            i18n_domain='ILIntranet',
100        ),
101        required=1
102    ),
103
104    TextField('contato',
105        index=":schema",
106        widget=TextAreaWidget(
107            description="Dados da pessoa e/ou organizacao contactado.",
108            rows=5,
109            label='Contato',
110            label_msgid='ILIntranet_label_contato',
111            description_msgid='ILIntranet_help_contato',
112            i18n_domain='ILIntranet',
113        ),
114        required=1
115    ),
116
117    TextField('assunto',
118        index="TextIndexNG|TextField:schema",
119        widget=TextAreaWidget(
120            description="Assunto tratado na ligacao.",
121            rows=5,
122            label='Assunto',
123            label_msgid='ILIntranet_label_assunto',
124            description_msgid='ILIntranet_help_assunto',
125            i18n_domain='ILIntranet',
126        ),
127        required=1
128    ),
129
130    StringField('autorizacao',
131        index=":schema",
132        widget=StringWidget(
133            description="Nome da pessoa que autorizou a ligacao.",
134            label="Autorizado por",
135            maxlength=40,
136            label_msgid='ILIntranet_label_autorizacao',
137            description_msgid='ILIntranet_help_autorizacao',
138            i18n_domain='ILIntranet',
139        ),
140        required=1
141    ),
142
143    StringField('setor',
144        index=":schema",
145        widget=SelectionWidget(
146            description="Diretoria ou servico onde esta lotado.",
147            rows=6,
148            label='Setor',
149            label_msgid='ILIntranet_label_setor',
150            description_msgid='ILIntranet_help_setor',
151            i18n_domain='ILIntranet',
152        ),
153        required=1,
154        vocabulary=['SINTER','GABINT','SEINPO','SSASTE','GBSAST','SEPLAP','SEACLE','SSADM','GBSSAD','SEADAD','SEFADM','SSFORM','GBFORM','SEATID','SSCAP','GBSCAP','SEPTED']
155    ),
156
157),
158)
159
160
161##code-section after-local-schema #fill in your manual code here
162##/code-section after-local-schema
163
164LigacaoInterurbana_schema = BaseSchema + \
165    schema
166
167##code-section after-schema #fill in your manual code here
168##/code-section after-schema
169
170class LigacaoInterurbana(BaseContent):
171    security = ClassSecurityInfo()
172    __implements__ = (getattr(BaseContent,'__implements__',()),)
173
174
175    # This name appears in the 'add' box
176    archetype_name             = 'Ligacao Interurbana'
177
178    meta_type                  = 'LigacaoInterurbana'
179    portal_type                = 'LigacaoInterurbana'
180    allowed_content_types      = []
181    filter_content_types       = 0
182    global_allow               = 0
183    allow_discussion           = 0
184    content_icon               = 'ligacao_interurbana_icon.gif'
185    immediate_view             = 'base_view'
186    default_view               = 'base_view'
187    suppl_views                = ()
188    typeDescription            = "Ligacao Interurbana"
189    typeDescMsgId              = 'description_edit_ligacaointerurbana'
190
191    schema = LigacaoInterurbana_schema
192
193    ##code-section class-header #fill in your manual code here
194    ##/code-section class-header
195
196
197    #Methods
198
199    security.declarePublic('Title')
200    def Title(self):
201        """
202        Retorna o id do owner e o telefone discado como titulo.
203        """
204       
205        dono = str(self.getOwner())
206        return dono+': '+self.getTelefone()
207
208
209
210registerType(LigacaoInterurbana,PROJECTNAME)
211# end of class LigacaoInterurbana
212
213##code-section module-footer #fill in your manual code here
214##/code-section module-footer
215
216
217
Note: Veja TracBrowser para ajuda no uso do navegador do trac.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.