1 | # File: Vencimentos.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 Products.ILSAALRecursosHumanos.interfaces.IVencimentos import IVencimentos |
---|
28 | |
---|
29 | from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary |
---|
30 | |
---|
31 | from Products.Archetypes.SQLStorage import * |
---|
32 | # additional imports from tagged value 'import' |
---|
33 | from Products.ILSAAL.saalapi import * |
---|
34 | |
---|
35 | from Products.ILSAALRecursosHumanos.config import * |
---|
36 | ##code-section module-header #fill in your manual code here |
---|
37 | ##/code-section module-header |
---|
38 | |
---|
39 | schema=Schema(( |
---|
40 | StringField('cod_vinculo', |
---|
41 | widget=SelectionWidget( |
---|
42 | label="Codigo Vinculo", |
---|
43 | description="Informe o codigo do vinculo.", |
---|
44 | format="select", |
---|
45 | label_msgid='ILSAALRecursosHumanos_label_cod_vinculo', |
---|
46 | description_msgid='ILSAALRecursosHumanos_help_cod_vinculo', |
---|
47 | i18n_domain='ILSAALRecursosHumanos', |
---|
48 | ), |
---|
49 | required=1, |
---|
50 | vocabulary=NamedVocabulary("""codigo_vinculo"""), |
---|
51 | enforceVocabulary=1 |
---|
52 | ), |
---|
53 | |
---|
54 | StringField('cod_cargo', |
---|
55 | widget=SelectionWidget( |
---|
56 | label="Codigo Cargo", |
---|
57 | description="Informe o codigo do cargo.", |
---|
58 | format="select", |
---|
59 | label_msgid='ILSAALRecursosHumanos_label_cod_cargo', |
---|
60 | description_msgid='ILSAALRecursosHumanos_help_cod_cargo', |
---|
61 | i18n_domain='ILSAALRecursosHumanos', |
---|
62 | ), |
---|
63 | required=1, |
---|
64 | vocabulary=NamedVocabulary("""codigo_cargo"""), |
---|
65 | enforceVocabulary=1 |
---|
66 | ), |
---|
67 | |
---|
68 | StringField('cod_nivel', |
---|
69 | widget=SelectionWidget( |
---|
70 | label="Codigo Nivel", |
---|
71 | description="Informe do codigo do Nivel.", |
---|
72 | format="select", |
---|
73 | label_msgid='ILSAALRecursosHumanos_label_cod_nivel', |
---|
74 | description_msgid='ILSAALRecursosHumanos_help_cod_nivel', |
---|
75 | i18n_domain='ILSAALRecursosHumanos', |
---|
76 | ), |
---|
77 | required=1, |
---|
78 | vocabulary=NamedVocabulary("""codigo_nivel"""), |
---|
79 | enforceVocabulary=1 |
---|
80 | ), |
---|
81 | |
---|
82 | StringField('cod_padrao', |
---|
83 | widget=SelectionWidget( |
---|
84 | label="Codigo padrao", |
---|
85 | description="Informe o codigo do padrao.", |
---|
86 | format="select", |
---|
87 | label_msgid='ILSAALRecursosHumanos_label_cod_padrao', |
---|
88 | description_msgid='ILSAALRecursosHumanos_help_cod_padrao', |
---|
89 | i18n_domain='ILSAALRecursosHumanos', |
---|
90 | ), |
---|
91 | required=1, |
---|
92 | vocabulary=NamedVocabulary("""codigo_padrao"""), |
---|
93 | enforceVocabulary=1 |
---|
94 | ), |
---|
95 | |
---|
96 | FloatField('vlr_vencimento', |
---|
97 | widget=DecimalWidget( |
---|
98 | label="Valor Vencimento", |
---|
99 | description="Informe o valor do vencimento.", |
---|
100 | label_msgid='ILSAALRecursosHumanos_label_vlr_vencimento', |
---|
101 | description_msgid='ILSAALRecursosHumanos_help_vlr_vencimento', |
---|
102 | i18n_domain='ILSAALRecursosHumanos', |
---|
103 | ), |
---|
104 | required=1 |
---|
105 | ), |
---|
106 | |
---|
107 | FloatField('vlr_complemento', |
---|
108 | widget=DecimalWidget( |
---|
109 | label="Valor Complemento", |
---|
110 | description="Informe o valor do complemento.", |
---|
111 | label_msgid='ILSAALRecursosHumanos_label_vlr_complemento', |
---|
112 | description_msgid='ILSAALRecursosHumanos_help_vlr_complemento', |
---|
113 | i18n_domain='ILSAALRecursosHumanos', |
---|
114 | ), |
---|
115 | required=1 |
---|
116 | ), |
---|
117 | |
---|
118 | ), |
---|
119 | ) |
---|
120 | |
---|
121 | |
---|
122 | ##code-section after-local-schema #fill in your manual code here |
---|
123 | ##/code-section after-local-schema |
---|
124 | |
---|
125 | Vencimentos_schema = BaseSchema + \ |
---|
126 | schema |
---|
127 | |
---|
128 | ##code-section after-schema #fill in your manual code here |
---|
129 | ##/code-section after-schema |
---|
130 | |
---|
131 | class Vencimentos(BaseContent): |
---|
132 | security = ClassSecurityInfo() |
---|
133 | __implements__ = (getattr(BaseContent,'__implements__',()),) + (IVencimentos,) |
---|
134 | |
---|
135 | |
---|
136 | # This name appears in the 'add' box |
---|
137 | archetype_name = 'Vencimentos' |
---|
138 | |
---|
139 | meta_type = 'Vencimentos' |
---|
140 | portal_type = 'Vencimentos' |
---|
141 | allowed_content_types = [] |
---|
142 | filter_content_types = 0 |
---|
143 | global_allow = 1 |
---|
144 | allow_discussion = 0 |
---|
145 | #content_icon = 'Vencimentos.gif' |
---|
146 | immediate_view = 'base_view' |
---|
147 | default_view = 'base_view' |
---|
148 | suppl_views = () |
---|
149 | typeDescription = "Vencimentos" |
---|
150 | typeDescMsgId = 'description_edit_vencimentos' |
---|
151 | |
---|
152 | schema = Vencimentos_schema |
---|
153 | |
---|
154 | ##code-section class-header #fill in your manual code here |
---|
155 | ##/code-section class-header |
---|
156 | |
---|
157 | |
---|
158 | #Methods |
---|
159 | #methods from Interface IVencimentos |
---|
160 | |
---|
161 | security.declarePrivate('_titulo') |
---|
162 | def _titulo(self): |
---|
163 | """ |
---|
164 | Configuracao do titulo que esse objeto deseja disponibilizar. |
---|
165 | """ |
---|
166 | |
---|
167 | return str(self.getCod_vinculo()) |
---|
168 | |
---|
169 | |
---|
170 | #manually created methods |
---|
171 | |
---|
172 | security.declarePublic('Title') |
---|
173 | def Title(self): |
---|
174 | """ |
---|
175 | |
---|
176 | """ |
---|
177 | |
---|
178 | pass |
---|
179 | |
---|
180 | |
---|
181 | |
---|
182 | registerType(Vencimentos,PROJECTNAME) |
---|
183 | # end of class Vencimentos |
---|
184 | |
---|
185 | ##code-section module-footer #fill in your manual code here |
---|
186 | ##/code-section module-footer |
---|
187 | |
---|
188 | |
---|
189 | |
---|