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

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

novo codigo gerado

File size: 4.4 KB
Linha 
1# File: Almoxarifado.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.IAlmoxarifado import IAlmoxarifado
28
29from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary
30
31from Products.Archetypes.SQLStorage import *
32# additional imports from tagged value 'import'
33from Products.ILSAAL.saalapi import *
34
35from Products.ILSAALMaterial.config import *
36##code-section module-header #fill in your manual code here
37##/code-section module-header
38
39schema=Schema((
40    StringField('cod_almoxarifado',
41        widget=SelectionWidget(
42            label="Local",
43            description="Informe o codigo do local de armazenamento do material.",
44            format="select",
45            label_msgid='ILSAALMaterial_label_cod_almoxarifado',
46            description_msgid='ILSAALMaterial_help_cod_almoxarifado',
47            i18n_domain='ILSAALMaterial',
48        ),
49        required=1,
50        vocabulary=NamedVocabulary("""local_almoxarifado"""),
51        enforceVocabulary=1
52    ),
53
54    TextField('des_almoxarifado',
55        widget=TextAreaWidget(
56            label="Descricao",
57            description="Descreva o local onde os itens estao armazendados.",
58            label_msgid='ILSAALMaterial_label_des_almoxarifado',
59            description_msgid='ILSAALMaterial_help_des_almoxarifado',
60            i18n_domain='ILSAALMaterial',
61        ),
62        required=1
63    ),
64
65    StringField('tip_almoxarifado',
66        widget=StringWidget(
67            label="Tipo",
68            description="Informe o tipo do local onde o item esta armazenado.",
69            label_msgid='ILSAALMaterial_label_tip_almoxarifado',
70            description_msgid='ILSAALMaterial_help_tip_almoxarifado',
71            i18n_domain='ILSAALMaterial',
72        ),
73        required=1
74    ),
75
76),
77)
78
79
80##code-section after-local-schema #fill in your manual code here
81##/code-section after-local-schema
82
83Almoxarifado_schema = BaseFolderSchema + \
84    schema
85
86##code-section after-schema #fill in your manual code here
87##/code-section after-schema
88
89class Almoxarifado(BaseFolder):
90    """
91    Representa o local de armazenamento do material.
92    """
93    security = ClassSecurityInfo()
94    __implements__ = (getattr(BaseFolder,'__implements__',()),) + (IAlmoxarifado,)
95
96
97    # This name appears in the 'add' box
98    archetype_name             = 'Almoxarifado'
99
100    meta_type                  = 'Almoxarifado'
101    portal_type                = 'Almoxarifado'
102    allowed_content_types      = ['Estoque']
103    filter_content_types       = 1
104    global_allow               = 0
105    allow_discussion           = 0
106    #content_icon               = 'Almoxarifado.gif'
107    immediate_view             = 'base_view'
108    default_view               = 'base_view'
109    suppl_views                = ()
110    typeDescription            = "Almoxarifado"
111    typeDescMsgId              = 'description_edit_almoxarifado'
112
113    schema = Almoxarifado_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 IAlmoxarifado
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_almoxarifado()
129
130
131
132registerType(Almoxarifado,PROJECTNAME)
133# end of class Almoxarifado
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.