source: publico/ILSAALMaterial/trunk/Consolidacao.py @ 1540

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

novo codigo gerado

File size: 6.1 KB
Linha 
1# File: Consolidacao.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
25from AccessControl import ClassSecurityInfo
26from Products.Archetypes.atapi import *
27from Products.ILSAALMaterial.interfaces.IConsolidacao import IConsolidacao
28
29
30from Products.Archetypes.SQLStorage import *
31# additional imports from tagged value 'import'
32from Products.ILSAAL.saalapi import *
33
34from Products.ILSAALMaterial.config import *
35##code-section module-header #fill in your manual code here
36##/code-section module-header
37
38schema=Schema((
39    IntegerField('cod_conta',
40        widget=IntegerWidget(
41            label="Conta",
42            description="Codigo da conta que a consolidacao se refere.",
43            label_msgid='ILSAALMaterial_label_cod_conta',
44            description_msgid='ILSAALMaterial_help_cod_conta',
45            i18n_domain='ILSAALMaterial',
46        ),
47        required=1
48    ),
49
50    FloatField('vlr_saldo_ant',
51        widget=CurrencyWidget(
52            label="Saldo Anterior",
53            description="Valor do saldo no inicio da consolidacao.",
54            label_msgid='ILSAALMaterial_label_vlr_saldo_ant',
55            description_msgid='ILSAALMaterial_help_vlr_saldo_ant',
56            i18n_domain='ILSAALMaterial',
57        ),
58        required=1
59    ),
60
61    FloatField('vlr_entrada_orc',
62        widget=CurrencyWidget(
63            label="Entrada",
64            description="Valor total das entradas orcamentarias.",
65            label_msgid='ILSAALMaterial_label_vlr_entrada_orc',
66            description_msgid='ILSAALMaterial_help_vlr_entrada_orc',
67            i18n_domain='ILSAALMaterial',
68        ),
69        required=1
70    ),
71
72    FloatField('vlr_entrada_extra_orc',
73        widget=CurrencyWidget(
74            label="Entrada Extra",
75            description="Valor total das entradas extra orcamentarias.",
76            label_msgid='ILSAALMaterial_label_vlr_entrada_extra_orc',
77            description_msgid='ILSAALMaterial_help_vlr_entrada_extra_orc',
78            i18n_domain='ILSAALMaterial',
79        ),
80        required=1
81    ),
82
83    FloatField('vlr_saida',
84        widget=CurrencyWidget(
85            label="Saida",
86            description="Valor total das saidas.",
87            label_msgid='ILSAALMaterial_label_vlr_saida',
88            description_msgid='ILSAALMaterial_help_vlr_saida',
89            i18n_domain='ILSAALMaterial',
90        ),
91        required=1
92    ),
93
94    FloatField('vlr_saldo_atual',
95        widget=CurrencyWidget(
96            label="Saldo Atual",
97            description="Valor do saldo atual.",
98            label_msgid='ILSAALMaterial_label_vlr_saldo_atual',
99            description_msgid='ILSAALMaterial_help_vlr_saldo_atual',
100            i18n_domain='ILSAALMaterial',
101        ),
102        required=1
103    ),
104
105    DateTimeField('dat_referencia',
106        widget=CalendarWidget(
107            label="Referencia",
108            description="Data de referencia da consolidacao.",
109            date_only=1,
110            format="%d/%m/%Y",
111            label_msgid='ILSAALMaterial_label_dat_referencia',
112            description_msgid='ILSAALMaterial_help_dat_referencia',
113            i18n_domain='ILSAALMaterial',
114        ),
115        required=1
116    ),
117
118
119    ReferenceField('cod_item_material',
120        vocabulary_display_path_bound=-1,
121        widget=ReferenceWidget(
122            label="Item Material",
123            description="Escolha o material.",
124            format="select",
125            checkbox_bound=1,
126            label_msgid='ILSAALMaterial_label_cod_item_material',
127            description_msgid='ILSAALMaterial_help_cod_item_material',
128            i18n_domain='ILSAALMaterial',
129        ),
130        allowed_types=('Material',),
131        multiValued=0,
132        relationship='Cosolidacao_Material'
133    ),
134
135),
136)
137
138
139##code-section after-local-schema #fill in your manual code here
140##/code-section after-local-schema
141
142Consolidacao_schema = BaseSchema + \
143    schema
144
145##code-section after-schema #fill in your manual code here
146##/code-section after-schema
147
148class Consolidacao(BaseContent):
149    """
150    Define a consolidacao de materiais.
151    """
152    security = ClassSecurityInfo()
153    __implements__ = (getattr(BaseContent,'__implements__',()),) + (IConsolidacao,)
154
155
156    # This name appears in the 'add' box
157    archetype_name             = 'Consolidacao'
158
159    meta_type                  = 'Consolidacao'
160    portal_type                = 'Consolidacao'
161    allowed_content_types      = []
162    filter_content_types       = 0
163    global_allow               = 0
164    allow_discussion           = 0
165    #content_icon               = 'Consolidacao.gif'
166    immediate_view             = 'base_view'
167    default_view               = 'base_view'
168    suppl_views                = ()
169    typeDescription            = "Consolidacao"
170    typeDescMsgId              = 'description_edit_consolidacao'
171
172    schema = Consolidacao_schema
173
174    ##code-section class-header #fill in your manual code here
175    ##/code-section class-header
176
177
178    #Methods
179    #methods from Interface IConsolidacao
180
181    security.declarePrivate('_titulo')
182    def _titulo(self):
183        """
184        Configuracao do titulo que esse objeto deseja disponibilizar.
185        """
186       
187        return self.getDat_referencia()
188
189
190
191registerType(Consolidacao,PROJECTNAME)
192# end of class Consolidacao
193
194##code-section module-footer #fill in your manual code here
195##/code-section module-footer
196
197
198
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.