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

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

novo codigo gerado

File size: 3.8 KB
Linha 
1# File: GrupoMaterial.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.IGrupoMaterial import IGrupoMaterial
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    StringField('cod_id',
40        widget=StringWidget(
41            label="Id",
42            description="Codigo de identificacao do grupo ou classe material.",
43            visible={'view':'invisible'},
44            label_msgid='ILSAALMaterial_label_cod_id',
45            description_msgid='ILSAALMaterial_help_cod_id',
46            i18n_domain='ILSAALMaterial',
47        ),
48        mode="rw"
49    ),
50
51    StringField('nom_material',
52        widget=StringWidget(
53            label="Material",
54            description="Nome do material.",
55            label_msgid='ILSAALMaterial_label_nom_material',
56            description_msgid='ILSAALMaterial_help_nom_material',
57            i18n_domain='ILSAALMaterial',
58        )
59    ),
60
61),
62)
63
64
65##code-section after-local-schema #fill in your manual code here
66##/code-section after-local-schema
67
68GrupoMaterial_schema = BaseFolderSchema + \
69    schema
70
71##code-section after-schema #fill in your manual code here
72##/code-section after-schema
73
74class GrupoMaterial(BaseFolder):
75    """
76    Um conjunto de Materiais
77    """
78    security = ClassSecurityInfo()
79    __implements__ = (getattr(BaseFolder,'__implements__',()),) + (IGrupoMaterial,)
80
81
82    # This name appears in the 'add' box
83    archetype_name             = 'GrupoMaterial'
84
85    meta_type                  = 'GrupoMaterial'
86    portal_type                = 'GrupoMaterial'
87    allowed_content_types      = ['Material', 'GrupoMaterial']
88    filter_content_types       = 1
89    global_allow               = 0
90    allow_discussion           = 0
91    #content_icon               = 'GrupoMaterial.gif'
92    immediate_view             = 'base_view'
93    default_view               = 'base_view'
94    suppl_views                = ()
95    typeDescription            = "GrupoMaterial"
96    typeDescMsgId              = 'description_edit_grupomaterial'
97
98    schema = GrupoMaterial_schema
99
100    ##code-section class-header #fill in your manual code here
101    ##/code-section class-header
102
103
104    #Methods
105    #methods from Interface IGrupoMaterial
106
107    security.declarePrivate('_titulo')
108    def _titulo(self):
109        """
110        Configuracao do titulo que esse objeto deseja disponibilizar.
111        """
112       
113        return self.getCod_id() + ': ' + self.getNom_material()
114
115
116
117registerType(GrupoMaterial,PROJECTNAME)
118# end of class GrupoMaterial
119
120##code-section module-footer #fill in your manual code here
121##/code-section module-footer
122
123
124
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.