1 | # File: PessoaFisica.py |
---|
2 | # |
---|
3 | # Copyright (c) 2005 by Interlegis |
---|
4 | # Generator: ArchGenXML Version 1.4.0-RC1 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 <stc@interlegis.gov.br>''' |
---|
22 | __docformat__ = 'plaintext' |
---|
23 | |
---|
24 | |
---|
25 | from AccessControl import ClassSecurityInfo |
---|
26 | from Products.Archetypes.atapi import * |
---|
27 | from ITitulo import ITitulo |
---|
28 | |
---|
29 | from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary |
---|
30 | |
---|
31 | from Products.Archetypes.SQLStorage import * |
---|
32 | # additional imports from tagged value 'import' |
---|
33 | from vocabularies import * |
---|
34 | from Products.ILSAAL.saalapi import * |
---|
35 | |
---|
36 | from Products.ILSAALRecursosHumanos.config import * |
---|
37 | ##code-section module-header #fill in your manual code here |
---|
38 | ##/code-section module-header |
---|
39 | |
---|
40 | schema=Schema(( |
---|
41 | StringField('nom_pessoa', |
---|
42 | widget=StringWidget( |
---|
43 | label="Nome", |
---|
44 | description="Informe o nome.", |
---|
45 | label_msgid='ILSAALRecursosHumanos_label_nom_pessoa', |
---|
46 | description_msgid='ILSAALRecursosHumanos_help_nom_pessoa', |
---|
47 | i18n_domain='ILSAALRecursosHumanos', |
---|
48 | ), |
---|
49 | required=1 |
---|
50 | ), |
---|
51 | |
---|
52 | DateTimeField('dat_nascimento', |
---|
53 | widget=CalendarWidget( |
---|
54 | label="Data de Nascimento", |
---|
55 | description="Informe a data de nascimento.", |
---|
56 | format="%d/%m/%Y", |
---|
57 | date_only=1, |
---|
58 | label_msgid='ILSAALRecursosHumanos_label_dat_nascimento', |
---|
59 | description_msgid='ILSAALRecursosHumanos_help_dat_nascimento', |
---|
60 | i18n_domain='ILSAALRecursosHumanos', |
---|
61 | ), |
---|
62 | required=1 |
---|
63 | ), |
---|
64 | |
---|
65 | StringField('cod_sexo', |
---|
66 | widget=SelectionWidget( |
---|
67 | label="Sexo", |
---|
68 | description="Informe o Sexo.", |
---|
69 | format="select", |
---|
70 | label_msgid='ILSAALRecursosHumanos_label_cod_sexo', |
---|
71 | description_msgid='ILSAALRecursosHumanos_help_cod_sexo', |
---|
72 | i18n_domain='ILSAALRecursosHumanos', |
---|
73 | ), |
---|
74 | enforceVocabulary=1, |
---|
75 | vocabulary=VOCAB_SEXO, |
---|
76 | required=1 |
---|
77 | ), |
---|
78 | |
---|
79 | BooleanField('ind_port_nec_especiais', |
---|
80 | default=0, |
---|
81 | widget=BooleanWidget( |
---|
82 | label="Portador de Nescessidade Especiais", |
---|
83 | description="Informe se a pessoas e portadora de nescessidades especiais.", |
---|
84 | label_msgid='ILSAALRecursosHumanos_label_ind_port_nec_especiais', |
---|
85 | description_msgid='ILSAALRecursosHumanos_help_ind_port_nec_especiais', |
---|
86 | i18n_domain='ILSAALRecursosHumanos', |
---|
87 | ), |
---|
88 | required=1 |
---|
89 | ), |
---|
90 | |
---|
91 | StringField('nom_pai', |
---|
92 | widget=StringWidget( |
---|
93 | label="Nome do Pai", |
---|
94 | description="Informe o nome do pai.", |
---|
95 | label_msgid='ILSAALRecursosHumanos_label_nom_pai', |
---|
96 | description_msgid='ILSAALRecursosHumanos_help_nom_pai', |
---|
97 | i18n_domain='ILSAALRecursosHumanos', |
---|
98 | ) |
---|
99 | ), |
---|
100 | |
---|
101 | StringField('nom_mae', |
---|
102 | widget=StringWidget( |
---|
103 | label="Nome da Mae", |
---|
104 | description="Informe o nome da mae.", |
---|
105 | label_msgid='ILSAALRecursosHumanos_label_nom_mae', |
---|
106 | description_msgid='ILSAALRecursosHumanos_help_nom_mae', |
---|
107 | i18n_domain='ILSAALRecursosHumanos', |
---|
108 | ), |
---|
109 | required=1 |
---|
110 | ), |
---|
111 | |
---|
112 | StringField('nom_naturalidade', |
---|
113 | widget=StringWidget( |
---|
114 | label="Naturalidade", |
---|
115 | description="Informe a naturalidade.", |
---|
116 | label_msgid='ILSAALRecursosHumanos_label_nom_naturalidade', |
---|
117 | description_msgid='ILSAALRecursosHumanos_help_nom_naturalidade', |
---|
118 | i18n_domain='ILSAALRecursosHumanos', |
---|
119 | ), |
---|
120 | required=1 |
---|
121 | ), |
---|
122 | |
---|
123 | StringField('sgf_uf_naturalidade', |
---|
124 | widget=SelectionWidget( |
---|
125 | label="UF Naturalidade", |
---|
126 | description="Informe a UF.", |
---|
127 | format="select", |
---|
128 | label_msgid='ILSAALRecursosHumanos_label_sgf_uf_naturalidade', |
---|
129 | description_msgid='ILSAALRecursosHumanos_help_sgf_uf_naturalidade', |
---|
130 | i18n_domain='ILSAALRecursosHumanos', |
---|
131 | ), |
---|
132 | enforceVocabulary=1, |
---|
133 | vocabulary=VOCAB_ESTADOS, |
---|
134 | required=1 |
---|
135 | ), |
---|
136 | |
---|
137 | StringField('cod_nacionalidade', |
---|
138 | widget=SelectionWidget( |
---|
139 | label="Nacionalidade", |
---|
140 | format="select", |
---|
141 | description="Informe a nacionalidade.", |
---|
142 | label_msgid='ILSAALRecursosHumanos_label_cod_nacionalidade', |
---|
143 | description_msgid='ILSAALRecursosHumanos_help_cod_nacionalidade', |
---|
144 | i18n_domain='ILSAALRecursosHumanos', |
---|
145 | ), |
---|
146 | enforceVocabulary=1, |
---|
147 | vocabulary=['1','2'], |
---|
148 | required=1 |
---|
149 | ), |
---|
150 | |
---|
151 | DateTimeField('dat_chegada_brasil', |
---|
152 | widget=CalendarWidget( |
---|
153 | label="Data chegada ao Brasil", |
---|
154 | description="Informe a data de chegada no brasil.", |
---|
155 | format="%d/%m/%Y", |
---|
156 | date_only=1, |
---|
157 | label_msgid='ILSAALRecursosHumanos_label_dat_chegada_brasil', |
---|
158 | description_msgid='ILSAALRecursosHumanos_help_dat_chegada_brasil', |
---|
159 | i18n_domain='ILSAALRecursosHumanos', |
---|
160 | ) |
---|
161 | ), |
---|
162 | |
---|
163 | StringField('cod_estado_civil', |
---|
164 | widget=SelectionWidget( |
---|
165 | label="Estado Civil", |
---|
166 | description="Informe o estado civil.", |
---|
167 | format="select", |
---|
168 | label_msgid='ILSAALRecursosHumanos_label_cod_estado_civil', |
---|
169 | description_msgid='ILSAALRecursosHumanos_help_cod_estado_civil', |
---|
170 | i18n_domain='ILSAALRecursosHumanos', |
---|
171 | ), |
---|
172 | required=1, |
---|
173 | vocabulary=NamedVocabulary("""PessoaFisica_cod_estado_civil"""), |
---|
174 | enforceVocabulary=1 |
---|
175 | ), |
---|
176 | |
---|
177 | TextField('des_logradouro', |
---|
178 | widget=TextAreaWidget( |
---|
179 | label="Logradouro", |
---|
180 | description="Informe o logradouro.", |
---|
181 | label_msgid='ILSAALRecursosHumanos_label_des_logradouro', |
---|
182 | description_msgid='ILSAALRecursosHumanos_help_des_logradouro', |
---|
183 | i18n_domain='ILSAALRecursosHumanos', |
---|
184 | ), |
---|
185 | required=1 |
---|
186 | ), |
---|
187 | |
---|
188 | StringField('nom_bairro', |
---|
189 | widget=StringWidget( |
---|
190 | label="Bairro", |
---|
191 | description="Informe o bairro.", |
---|
192 | label_msgid='ILSAALRecursosHumanos_label_nom_bairro', |
---|
193 | description_msgid='ILSAALRecursosHumanos_help_nom_bairro', |
---|
194 | i18n_domain='ILSAALRecursosHumanos', |
---|
195 | ), |
---|
196 | required=1 |
---|
197 | ), |
---|
198 | |
---|
199 | StringField('nom_cidade', |
---|
200 | widget=StringWidget( |
---|
201 | label="Cidade", |
---|
202 | description="Informe a cidade.", |
---|
203 | label_msgid='ILSAALRecursosHumanos_label_nom_cidade', |
---|
204 | description_msgid='ILSAALRecursosHumanos_help_nom_cidade', |
---|
205 | i18n_domain='ILSAALRecursosHumanos', |
---|
206 | ), |
---|
207 | required=1 |
---|
208 | ), |
---|
209 | |
---|
210 | StringField('sgl_uf', |
---|
211 | widget=SelectionWidget( |
---|
212 | label="UF", |
---|
213 | description="Informe a UF.", |
---|
214 | format="select", |
---|
215 | label_msgid='ILSAALRecursosHumanos_label_sgl_uf', |
---|
216 | description_msgid='ILSAALRecursosHumanos_help_sgl_uf', |
---|
217 | i18n_domain='ILSAALRecursosHumanos', |
---|
218 | ), |
---|
219 | enforceVocabulary=1, |
---|
220 | vocabulary=VOCAB_ESTADOS, |
---|
221 | required=1 |
---|
222 | ), |
---|
223 | |
---|
224 | IntegerField('num_cep', |
---|
225 | widget=IntegerWidget( |
---|
226 | label="CEP", |
---|
227 | description="Informe o Codigo de Enderecamento Postal.", |
---|
228 | label_msgid='ILSAALRecursosHumanos_label_num_cep', |
---|
229 | description_msgid='ILSAALRecursosHumanos_help_num_cep', |
---|
230 | i18n_domain='ILSAALRecursosHumanos', |
---|
231 | ), |
---|
232 | required=1, |
---|
233 | validators=('ehCEP',) |
---|
234 | ), |
---|
235 | |
---|
236 | IntegerField('num_telefone', |
---|
237 | widget=IntegerWidget( |
---|
238 | label="Telefone", |
---|
239 | description="Informe o numero do telefone.", |
---|
240 | label_msgid='ILSAALRecursosHumanos_label_num_telefone', |
---|
241 | description_msgid='ILSAALRecursosHumanos_help_num_telefone', |
---|
242 | i18n_domain='ILSAALRecursosHumanos', |
---|
243 | ) |
---|
244 | ), |
---|
245 | |
---|
246 | IntegerField('num_celular', |
---|
247 | widget=IntegerWidget( |
---|
248 | label="Celular", |
---|
249 | description="Informe o numero do celular.", |
---|
250 | label_msgid='ILSAALRecursosHumanos_label_num_celular', |
---|
251 | description_msgid='ILSAALRecursosHumanos_help_num_celular', |
---|
252 | i18n_domain='ILSAALRecursosHumanos', |
---|
253 | ) |
---|
254 | ), |
---|
255 | |
---|
256 | StringField('end_mail', |
---|
257 | widget=StringWidget( |
---|
258 | label="E-Mail", |
---|
259 | description="Informe o e-mail", |
---|
260 | label_msgid='ILSAALRecursosHumanos_label_end_mail', |
---|
261 | description_msgid='ILSAALRecursosHumanos_help_end_mail', |
---|
262 | i18n_domain='ILSAALRecursosHumanos', |
---|
263 | ), |
---|
264 | validators=('isMail',) |
---|
265 | ), |
---|
266 | |
---|
267 | StringField('num_cpf', |
---|
268 | widget=StringWidget( |
---|
269 | label="CPF", |
---|
270 | description="Informe o numero do CPF.", |
---|
271 | label_msgid='ILSAALRecursosHumanos_label_num_cpf', |
---|
272 | description_msgid='ILSAALRecursosHumanos_help_num_cpf', |
---|
273 | i18n_domain='ILSAALRecursosHumanos', |
---|
274 | ), |
---|
275 | required=1, |
---|
276 | validators=('ehCPF',) |
---|
277 | ), |
---|
278 | |
---|
279 | IntegerField('num_identidade', |
---|
280 | widget=IntegerWidget( |
---|
281 | label="Identidade", |
---|
282 | description="Informe o numero da identidade.", |
---|
283 | label_msgid='ILSAALRecursosHumanos_label_num_identidade', |
---|
284 | description_msgid='ILSAALRecursosHumanos_help_num_identidade', |
---|
285 | i18n_domain='ILSAALRecursosHumanos', |
---|
286 | ), |
---|
287 | required=1 |
---|
288 | ), |
---|
289 | |
---|
290 | StringField('sgl_orgao_exp_identidade', |
---|
291 | widget=StringWidget( |
---|
292 | label="Orgao Expedidor", |
---|
293 | description="Informe o orgao expedidor da identidade.", |
---|
294 | label_msgid='ILSAALRecursosHumanos_label_sgl_orgao_exp_identidade', |
---|
295 | description_msgid='ILSAALRecursosHumanos_help_sgl_orgao_exp_identidade', |
---|
296 | i18n_domain='ILSAALRecursosHumanos', |
---|
297 | ), |
---|
298 | required=1 |
---|
299 | ), |
---|
300 | |
---|
301 | StringField('sgl_uf_exp_identidade', |
---|
302 | widget=SelectionWidget( |
---|
303 | label="UF", |
---|
304 | description="Informe a UF da identidade.", |
---|
305 | format="select", |
---|
306 | label_msgid='ILSAALRecursosHumanos_label_sgl_uf_exp_identidade', |
---|
307 | description_msgid='ILSAALRecursosHumanos_help_sgl_uf_exp_identidade', |
---|
308 | i18n_domain='ILSAALRecursosHumanos', |
---|
309 | ), |
---|
310 | enforceVocabulary=1, |
---|
311 | vocabulary=VOCAB_ESTADOS, |
---|
312 | required=1 |
---|
313 | ), |
---|
314 | |
---|
315 | DateTimeField('dat_exp_identidade', |
---|
316 | widget=CalendarWidget( |
---|
317 | descritpion="Informe a data de expedicao da identidade.", |
---|
318 | format="%d/%m/%Y", |
---|
319 | date_only=1, |
---|
320 | label="Data", |
---|
321 | label_msgid='ILSAALRecursosHumanos_label_dat_exp_identidade', |
---|
322 | description_msgid='ILSAALRecursosHumanos_help_dat_exp_identidade', |
---|
323 | i18n_domain='ILSAALRecursosHumanos', |
---|
324 | ), |
---|
325 | required=1 |
---|
326 | ), |
---|
327 | |
---|
328 | StringField('cod_banco', |
---|
329 | widget=StringWidget( |
---|
330 | label="Banco", |
---|
331 | description="Informe o banco.", |
---|
332 | label_msgid='ILSAALRecursosHumanos_label_cod_banco', |
---|
333 | description_msgid='ILSAALRecursosHumanos_help_cod_banco', |
---|
334 | i18n_domain='ILSAALRecursosHumanos', |
---|
335 | ) |
---|
336 | ), |
---|
337 | |
---|
338 | StringField('cod_agencia', |
---|
339 | widget=StringWidget( |
---|
340 | label="Agencia", |
---|
341 | description="Informe a agencia bancaria.", |
---|
342 | label_msgid='ILSAALRecursosHumanos_label_cod_agencia', |
---|
343 | description_msgid='ILSAALRecursosHumanos_help_cod_agencia', |
---|
344 | i18n_domain='ILSAALRecursosHumanos', |
---|
345 | ) |
---|
346 | ), |
---|
347 | |
---|
348 | StringField('num_conta_corrente', |
---|
349 | widget=StringWidget( |
---|
350 | label="Conta Corrente", |
---|
351 | description="Informe a conta corrente.", |
---|
352 | label_msgid='ILSAALRecursosHumanos_label_num_conta_corrente', |
---|
353 | description_msgid='ILSAALRecursosHumanos_help_num_conta_corrente', |
---|
354 | i18n_domain='ILSAALRecursosHumanos', |
---|
355 | ) |
---|
356 | ), |
---|
357 | |
---|
358 | ), |
---|
359 | ) |
---|
360 | |
---|
361 | |
---|
362 | ##code-section after-local-schema #fill in your manual code here |
---|
363 | ##/code-section after-local-schema |
---|
364 | |
---|
365 | PessoaFisica_schema = schema |
---|
366 | |
---|
367 | ##code-section after-schema #fill in your manual code here |
---|
368 | ##/code-section after-schema |
---|
369 | |
---|
370 | class PessoaFisica: |
---|
371 | """ |
---|
372 | Esta classe mantem dados sobre todas as pessoas fisicas que |
---|
373 | encontram-se de alguma forma relacionadas com a Casa |
---|
374 | Legislativa. Uma instancia desta classe esta associada a: |
---|
375 | * a apenas uma instancia da classe Empregado; |
---|
376 | * a apenas uma instancia da classe Dependentes; |
---|
377 | * a apenas uma instancia da classe Pensionista; |
---|
378 | * a apenas uma instancia da classe GrauInstrucao; |
---|
379 | * a apenas uma instancia da classe EstadoCivil; |
---|
380 | * a apenas uma instancia da classe BancoAgencia; |
---|
381 | * a 4 instancias da classe Uf; |
---|
382 | * a uma ou mais instancias da classe Endereco; |
---|
383 | * a uma instancia da classe Nacionalidade; |
---|
384 | """ |
---|
385 | security = ClassSecurityInfo() |
---|
386 | __implements__ = () + (ITitulo,) |
---|
387 | |
---|
388 | |
---|
389 | allowed_content_types = [] |
---|
390 | schema = PessoaFisica_schema |
---|
391 | |
---|
392 | ##code-section class-header #fill in your manual code here |
---|
393 | ##/code-section class-header |
---|
394 | |
---|
395 | |
---|
396 | #Methods |
---|
397 | #methods from Interface ITitulo |
---|
398 | |
---|
399 | security.declarePrivate('_titulo') |
---|
400 | def _titulo(self): |
---|
401 | """ |
---|
402 | Configuracao do titulo que esse objeto deseja disponibilizar. |
---|
403 | """ |
---|
404 | |
---|
405 | return self.getNom_pessoa() |
---|
406 | |
---|
407 | |
---|
408 | # end of class PessoaFisica |
---|
409 | |
---|
410 | ##code-section module-footer #fill in your manual code here |
---|
411 | ##/code-section module-footer |
---|
412 | |
---|
413 | |
---|
414 | |
---|