source: publico/ILSAALOrcamento/trunk/NaturezaDespesa.py @ 867

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

Inserido Conteiner NaturezaOrcamento? no SALL

File size: 4.5 KB
Linha 
1# File: NaturezaDespesa.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
25from AccessControl import ClassSecurityInfo
26from Products.Archetypes.atapi import *
27from NaturezaOrcamento import NaturezaOrcamento
28from Products.ILSAALOrcamento.interfaces.INaturezaDespesa import INaturezaDespesa
29
30
31from Products.Archetypes.SQLStorage import *
32# additional imports from tagged value 'import'
33from Products.ILSAAL.saalapi import *
34
35from Products.ILSAALOrcamento.config import *
36##code-section module-header #fill in your manual code here
37##/code-section module-header
38
39schema=Schema((
40    StringField('cod_elemento',
41        widget=StringWidget(
42            label="Codigo do Elemento",
43            description="Informe o codigo do elemento.",
44            label_msgid='ILSAALOrcamento_label_cod_elemento',
45            description_msgid='ILSAALOrcamento_help_cod_elemento',
46            i18n_domain='ILSAALOrcamento',
47        ),
48        required=1
49    ),
50
51    StringField('cod_subelemento',
52        widget=StringWidget(
53            label="Codigo do Subelemento",
54            description="Entre com o codigo do subelemento.",
55            label_msgid='ILSAALOrcamento_label_cod_subelemento',
56            description_msgid='ILSAALOrcamento_help_cod_subelemento',
57            i18n_domain='ILSAALOrcamento',
58        ),
59        required=1
60    ),
61
62    StringField('cod_item',
63        widget=StringWidget(
64            label="Codigo do Item",
65            description="Informe o codigo do item.",
66            label_msgid='ILSAALOrcamento_label_cod_item',
67            description_msgid='ILSAALOrcamento_help_cod_item',
68            i18n_domain='ILSAALOrcamento',
69        ),
70        required=1
71    ),
72
73),
74)
75
76
77##code-section after-local-schema #fill in your manual code here
78##/code-section after-local-schema
79
80NaturezaDespesa_schema = BaseSchema + \
81    getattr(NaturezaOrcamento,'schema',Schema(())) + \
82    schema
83
84##code-section after-schema #fill in your manual code here
85##/code-section after-schema
86
87class NaturezaDespesa(NaturezaOrcamento,BaseContent):
88    """
89    Mantem codigos e descricoes das naturezas de despesa que compoem
90    a classificacao economica da despesa, conforme o Anexo II da
91    Portaria 163, de 04/05/2001.
92    """
93    security = ClassSecurityInfo()
94    __implements__ = (getattr(NaturezaOrcamento,'__implements__',()),) + (getattr(BaseContent,'__implements__',()),) + (INaturezaDespesa,)
95
96
97    # This name appears in the 'add' box
98    archetype_name             = 'Natureza da Despeza'
99
100    meta_type                  = 'NaturezaDespesa'
101    portal_type                = 'NaturezaDespesa'
102    allowed_content_types      = [] + list(getattr(NaturezaOrcamento, 'allowed_content_types', []))
103    filter_content_types       = 0
104    global_allow               = 0
105    allow_discussion           = 0
106    #content_icon               = 'NaturezaDespesa.gif'
107    immediate_view             = 'base_view'
108    default_view               = 'base_view'
109    suppl_views                = ()
110    typeDescription            = "Natureza da Despeza"
111    typeDescMsgId              = 'description_edit_naturezadespesa'
112
113    schema = NaturezaDespesa_schema
114
115    ##code-section class-header #fill in your manual code here
116    ##/code-section class-header
117
118
119    #Methods
120    #methods from Interface INaturezaDespesa
121
122    security.declarePrivate('_titulo')
123    def _titulo(self):
124      """
125      Configuracao do titulo que esse objeto deseja disponibilizar.
126      """
127
128      return self.getCod_categoria_desp()
129
130
131
132registerType(NaturezaDespesa,PROJECTNAME)
133# end of class NaturezaDespesa
134
135##code-section module-footer #fill in your manual code here
136##/code-section module-footer
137
138
139
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.