1 | # File: NaturezaOrcamento.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 Products.ILSAALOrcamento.interfaces.INaturezaOrcamento import INaturezaOrcamento |
---|
28 | |
---|
29 | |
---|
30 | from Products.Archetypes.SQLStorage import * |
---|
31 | from Products.ILSAALOrcamento.config import * |
---|
32 | ##code-section module-header #fill in your manual code here |
---|
33 | ##/code-section module-header |
---|
34 | |
---|
35 | schema=Schema(( |
---|
36 | StringField('cod_categoria', |
---|
37 | widget=StringWidget( |
---|
38 | label="Codigo da Categoria", |
---|
39 | description="Informe o codigo da categoria.", |
---|
40 | label_msgid='ILSAALOrcamento_label_cod_categoria', |
---|
41 | description_msgid='ILSAALOrcamento_help_cod_categoria', |
---|
42 | i18n_domain='ILSAALOrcamento', |
---|
43 | ), |
---|
44 | required=1 |
---|
45 | ), |
---|
46 | |
---|
47 | StringField('cod_subcategoria', |
---|
48 | widget=StringWidget( |
---|
49 | label="Codigo da Subcategoria", |
---|
50 | description="Informe o codigo da subcategoria.", |
---|
51 | label_msgid='ILSAALOrcamento_label_cod_subcategoria', |
---|
52 | description_msgid='ILSAALOrcamento_help_cod_subcategoria', |
---|
53 | i18n_domain='ILSAALOrcamento', |
---|
54 | ), |
---|
55 | required=1 |
---|
56 | ), |
---|
57 | |
---|
58 | StringField('cod_natureza', |
---|
59 | widget=StringWidget( |
---|
60 | label="Codigo da Natureza", |
---|
61 | description="Informe o codigo da natureza.", |
---|
62 | label_msgid='ILSAALOrcamento_label_cod_natureza', |
---|
63 | description_msgid='ILSAALOrcamento_help_cod_natureza', |
---|
64 | i18n_domain='ILSAALOrcamento', |
---|
65 | ), |
---|
66 | required=1 |
---|
67 | ), |
---|
68 | |
---|
69 | TextField('des_natureza', |
---|
70 | widget=TextAreaWidget( |
---|
71 | label="Decricao", |
---|
72 | description="Descreva esta natureza.", |
---|
73 | label_msgid='ILSAALOrcamento_label_des_natureza', |
---|
74 | description_msgid='ILSAALOrcamento_help_des_natureza', |
---|
75 | i18n_domain='ILSAALOrcamento', |
---|
76 | ), |
---|
77 | required=1 |
---|
78 | ), |
---|
79 | |
---|
80 | ), |
---|
81 | ) |
---|
82 | |
---|
83 | |
---|
84 | ##code-section after-local-schema #fill in your manual code here |
---|
85 | ##/code-section after-local-schema |
---|
86 | |
---|
87 | NaturezaOrcamento_schema = schema |
---|
88 | |
---|
89 | ##code-section after-schema #fill in your manual code here |
---|
90 | ##/code-section after-schema |
---|
91 | |
---|
92 | class NaturezaOrcamento: |
---|
93 | """ |
---|
94 | Classe abstrata da Natureza do Orcamento. Eh utilizada como base |
---|
95 | para objetos de Natureza da Despesa e Natureza de Receita. |
---|
96 | """ |
---|
97 | security = ClassSecurityInfo() |
---|
98 | __implements__ = () + (INaturezaOrcamento,) |
---|
99 | |
---|
100 | |
---|
101 | allowed_content_types = [] |
---|
102 | schema = NaturezaOrcamento_schema |
---|
103 | |
---|
104 | ##code-section class-header #fill in your manual code here |
---|
105 | ##/code-section class-header |
---|
106 | |
---|
107 | |
---|
108 | #Methods |
---|
109 | #methods from Interface INaturezaOrcamento |
---|
110 | |
---|
111 | security.declarePrivate('_titulo') |
---|
112 | def _titulo(self): |
---|
113 | """ |
---|
114 | Define um titulo personalizado para este objeto. |
---|
115 | """ |
---|
116 | |
---|
117 | return self.getCod_categoria() + ':' + self.getCod_natureza() |
---|
118 | |
---|
119 | |
---|
120 | |
---|
121 | |
---|
122 | # end of class NaturezaOrcamento |
---|
123 | |
---|
124 | ##code-section module-footer #fill in your manual code here |
---|
125 | ##/code-section module-footer |
---|
126 | |
---|
127 | |
---|
128 | |
---|