1 | # File: NaturezaReceita.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 | |
---|
25 | from AccessControl import ClassSecurityInfo |
---|
26 | from Products.Archetypes.atapi import * |
---|
27 | from NaturezaOrcamento import NaturezaOrcamento |
---|
28 | from Products.ILSAALOrcamento.interfaces.INaturezaReceita import INaturezaReceita |
---|
29 | |
---|
30 | |
---|
31 | from Products.Archetypes.SQLStorage import * |
---|
32 | # additional imports from tagged value 'import' |
---|
33 | from Products.ILSAAL.saalapi import * |
---|
34 | |
---|
35 | from Products.ILSAALOrcamento.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_fonte_recursos', |
---|
41 | widget=StringWidget( |
---|
42 | label="Codigo da Fonte de Recursos", |
---|
43 | description="Informe o codigo da fonte de recursos.", |
---|
44 | label_msgid='ILSAALOrcamento_label_cod_fonte_recursos', |
---|
45 | description_msgid='ILSAALOrcamento_help_cod_fonte_recursos', |
---|
46 | i18n_domain='ILSAALOrcamento', |
---|
47 | ), |
---|
48 | required=1 |
---|
49 | ), |
---|
50 | |
---|
51 | StringField('cod_rubrica', |
---|
52 | widget=StringWidget( |
---|
53 | label="Codigo da Rubrica", |
---|
54 | description="Informe o codigo da rubrica.", |
---|
55 | label_msgid='ILSAALOrcamento_label_cod_rubrica', |
---|
56 | description_msgid='ILSAALOrcamento_help_cod_rubrica', |
---|
57 | i18n_domain='ILSAALOrcamento', |
---|
58 | ), |
---|
59 | required=1 |
---|
60 | ), |
---|
61 | |
---|
62 | StringField('cod_alinea', |
---|
63 | widget=StringWidget( |
---|
64 | label="Codigo da Alinea", |
---|
65 | description="Informe o codigo da Alinea.", |
---|
66 | label_msgid='ILSAALOrcamento_label_cod_alinea', |
---|
67 | description_msgid='ILSAALOrcamento_help_cod_alinea', |
---|
68 | i18n_domain='ILSAALOrcamento', |
---|
69 | ), |
---|
70 | required=1 |
---|
71 | ), |
---|
72 | |
---|
73 | StringField('cod_subalinea', |
---|
74 | widget=StringWidget( |
---|
75 | label="Codigo da Subalinea", |
---|
76 | description="Informe o codigo da subalinea.", |
---|
77 | label_msgid='ILSAALOrcamento_label_cod_subalinea', |
---|
78 | description_msgid='ILSAALOrcamento_help_cod_subalinea', |
---|
79 | i18n_domain='ILSAALOrcamento', |
---|
80 | ), |
---|
81 | required=1 |
---|
82 | ), |
---|
83 | |
---|
84 | ), |
---|
85 | ) |
---|
86 | |
---|
87 | |
---|
88 | ##code-section after-local-schema #fill in your manual code here |
---|
89 | ##/code-section after-local-schema |
---|
90 | |
---|
91 | NaturezaReceita_schema = BaseSchema + \ |
---|
92 | getattr(NaturezaOrcamento,'schema',Schema(())) + \ |
---|
93 | schema |
---|
94 | |
---|
95 | ##code-section after-schema #fill in your manual code here |
---|
96 | ##/code-section after-schema |
---|
97 | |
---|
98 | class NaturezaReceita(NaturezaOrcamento,BaseContent): |
---|
99 | """ |
---|
100 | Mantem codigos e descricoes das naturezas de receitas que |
---|
101 | compoem a classificacao economica da receita, conforme a |
---|
102 | estrutura de classificacao |
---|
103 | """ |
---|
104 | security = ClassSecurityInfo() |
---|
105 | __implements__ = (getattr(NaturezaOrcamento,'__implements__',()),) + (getattr(BaseContent,'__implements__',()),) + (INaturezaReceita,) |
---|
106 | |
---|
107 | |
---|
108 | # This name appears in the 'add' box |
---|
109 | archetype_name = 'NaturezaReceita' |
---|
110 | |
---|
111 | meta_type = 'NaturezaReceita' |
---|
112 | portal_type = 'NaturezaReceita' |
---|
113 | allowed_content_types = [] + list(getattr(NaturezaOrcamento, 'allowed_content_types', [])) |
---|
114 | filter_content_types = 0 |
---|
115 | global_allow = 0 |
---|
116 | allow_discussion = 0 |
---|
117 | #content_icon = 'NaturezaReceita.gif' |
---|
118 | immediate_view = 'base_view' |
---|
119 | default_view = 'base_view' |
---|
120 | suppl_views = () |
---|
121 | typeDescription = "NaturezaReceita" |
---|
122 | typeDescMsgId = 'description_edit_naturezareceita' |
---|
123 | |
---|
124 | schema = NaturezaReceita_schema |
---|
125 | |
---|
126 | ##code-section class-header #fill in your manual code here |
---|
127 | ##/code-section class-header |
---|
128 | |
---|
129 | |
---|
130 | #Methods |
---|
131 | #methods from Interface INaturezaReceita |
---|
132 | |
---|
133 | security.declarePrivate('_titulo') |
---|
134 | def _titulo(self): |
---|
135 | """ |
---|
136 | Configuracao do titulo que esse objeto deseja disponibilizar. |
---|
137 | """ |
---|
138 | |
---|
139 | return self.getCod_categoria_rec() |
---|
140 | |
---|
141 | |
---|
142 | |
---|
143 | registerType(NaturezaReceita,PROJECTNAME) |
---|
144 | # end of class NaturezaReceita |
---|
145 | |
---|
146 | ##code-section module-footer #fill in your manual code here |
---|
147 | ##/code-section module-footer |
---|
148 | |
---|
149 | |
---|
150 | |
---|