1 | # File: Dependente.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 <stc@interlegis.gov.br>''' |
---|
22 | __docformat__ = 'plaintext' |
---|
23 | |
---|
24 | |
---|
25 | from AccessControl import ClassSecurityInfo |
---|
26 | from Products.Archetypes.atapi import * |
---|
27 | from PessoaFisica import PessoaFisica |
---|
28 | from Products.ILSAALRecursosHumanos.interfaces.IDependentes import IDependentes |
---|
29 | |
---|
30 | from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary |
---|
31 | |
---|
32 | from Products.Archetypes.SQLStorage import * |
---|
33 | # additional imports from tagged value '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('tip_dependente', |
---|
42 | widget=SelectionWidget( |
---|
43 | label="Tipo Dependente", |
---|
44 | description="Informe o tipo de dependente.", |
---|
45 | format="select", |
---|
46 | label_msgid='ILSAALRecursosHumanos_label_tip_dependente', |
---|
47 | description_msgid='ILSAALRecursosHumanos_help_tip_dependente', |
---|
48 | i18n_domain='ILSAALRecursosHumanos', |
---|
49 | ), |
---|
50 | required=1, |
---|
51 | vocabulary=NamedVocabulary("""tipo_dependente"""), |
---|
52 | enforceVocabulary=1 |
---|
53 | ), |
---|
54 | |
---|
55 | IntegerField('ind_irrf', |
---|
56 | widget=IntegerWidget( |
---|
57 | label="Indicador IRRF", |
---|
58 | description="Informe o indicador irrf.", |
---|
59 | label_msgid='ILSAALRecursosHumanos_label_ind_irrf', |
---|
60 | description_msgid='ILSAALRecursosHumanos_help_ind_irrf', |
---|
61 | i18n_domain='ILSAALRecursosHumanos', |
---|
62 | ), |
---|
63 | required=1 |
---|
64 | ), |
---|
65 | |
---|
66 | IntegerField('ind_salfam', |
---|
67 | widget=IntegerWidget( |
---|
68 | label="Indicador Salario Familia", |
---|
69 | description="Informe o indicador do salario familia.", |
---|
70 | label_msgid='ILSAALRecursosHumanos_label_ind_salfam', |
---|
71 | description_msgid='ILSAALRecursosHumanos_help_ind_salfam', |
---|
72 | i18n_domain='ILSAALRecursosHumanos', |
---|
73 | ), |
---|
74 | required=1 |
---|
75 | ), |
---|
76 | |
---|
77 | ), |
---|
78 | ) |
---|
79 | |
---|
80 | |
---|
81 | ##code-section after-local-schema #fill in your manual code here |
---|
82 | ##/code-section after-local-schema |
---|
83 | |
---|
84 | Dependente_schema = BaseSchema + \ |
---|
85 | getattr(PessoaFisica,'schema',Schema(())) + \ |
---|
86 | schema |
---|
87 | |
---|
88 | ##code-section after-schema #fill in your manual code here |
---|
89 | ##/code-section after-schema |
---|
90 | |
---|
91 | class Dependente(PessoaFisica,BaseContent): |
---|
92 | """ |
---|
93 | Esta classe mantem dados dos dependentes das pessoas que |
---|
94 | trabalham na Casa Legislativa. Cada instancia desta classe esta |
---|
95 | associada a: |
---|
96 | * apenas uma instancia da classe PessoaFisica; |
---|
97 | * apenas uma instancia da classe Nacionalidade; |
---|
98 | * apenas uma instancia da classe Uf. |
---|
99 | """ |
---|
100 | security = ClassSecurityInfo() |
---|
101 | __implements__ = (getattr(PessoaFisica,'__implements__',()),) + (getattr(BaseContent,'__implements__',()),) + (IDependentes,) |
---|
102 | |
---|
103 | |
---|
104 | # This name appears in the 'add' box |
---|
105 | archetype_name = 'Dependente' |
---|
106 | |
---|
107 | meta_type = 'Dependente' |
---|
108 | portal_type = 'Dependente' |
---|
109 | allowed_content_types = [] + list(getattr(PessoaFisica, 'allowed_content_types', [])) |
---|
110 | filter_content_types = 0 |
---|
111 | global_allow = 0 |
---|
112 | allow_discussion = 0 |
---|
113 | content_icon = 'dependente.png' |
---|
114 | immediate_view = 'base_view' |
---|
115 | default_view = 'base_view' |
---|
116 | suppl_views = () |
---|
117 | typeDescription = "Dependente" |
---|
118 | typeDescMsgId = 'description_edit_dependente' |
---|
119 | |
---|
120 | schema = Dependente_schema |
---|
121 | |
---|
122 | ##code-section class-header #fill in your manual code here |
---|
123 | ##/code-section class-header |
---|
124 | |
---|
125 | |
---|
126 | #Methods |
---|
127 | #manually created methods |
---|
128 | |
---|
129 | def _titulo(self): |
---|
130 | """ |
---|
131 | |
---|
132 | """ |
---|
133 | |
---|
134 | pass |
---|
135 | |
---|
136 | |
---|
137 | security.declarePublic('Title') |
---|
138 | def Title(self): |
---|
139 | """ |
---|
140 | |
---|
141 | """ |
---|
142 | |
---|
143 | pass |
---|
144 | |
---|
145 | |
---|
146 | |
---|
147 | registerType(Dependente,PROJECTNAME) |
---|
148 | # end of class Dependente |
---|
149 | |
---|
150 | ##code-section module-footer #fill in your manual code here |
---|
151 | ##/code-section module-footer |
---|
152 | |
---|
153 | |
---|
154 | |
---|