source: publico/ILSAALMaterial/trunk/Estoque.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.3 KB
Linha 
1# File: Estoque.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.IEstoque import IEstoque
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('qtd_item_estoque',
40        default="0",
41        widget=IntegerWidget(
42            label="Estoque",
43            description="Quantidade do item no estoque.",
44            label_msgid='ILSAALMaterial_label_qtd_item_estoque',
45            description_msgid='ILSAALMaterial_help_qtd_item_estoque',
46            i18n_domain='ILSAALMaterial',
47        ),
48        required=1
49    ),
50
51    IntegerField('vlr_unitario_item_material',
52        default="0",
53        widget=IntegerWidget(
54            label="Valor Unitario",
55            description="Valor unitario do item material no estoque.",
56            label_msgid='ILSAALMaterial_label_vlr_unitario_item_material',
57            description_msgid='ILSAALMaterial_help_vlr_unitario_item_material',
58            i18n_domain='ILSAALMaterial',
59        ),
60        required=1
61    ),
62
63
64    ReferenceField('cod_item_material',
65        widget=ReferenceWidget(
66            label="Codigo Item Material",
67            description="Escolha o material",
68            format="select",
69            checkbox_bound=0,
70            label_msgid='ILSAALMaterial_label_cod_item_material',
71            description_msgid='ILSAALMaterial_help_cod_item_material',
72            i18n_domain='ILSAALMaterial',
73        ),
74        vocabulary_display_path_bound= -1,
75        multiValued=0,
76        relationship='Estoque_Material',
77        allowed_types=('Material',),
78        required=1
79    ),
80
81),
82)
83
84
85##code-section after-local-schema #fill in your manual code here
86##/code-section after-local-schema
87
88Estoque_schema = BaseFolderSchema + \
89    schema
90
91##code-section after-schema #fill in your manual code here
92##/code-section after-schema
93
94class Estoque(BaseFolder):
95    """
96    Representa o estoque do material.
97    """
98    security = ClassSecurityInfo()
99    __implements__ = (getattr(BaseFolder,'__implements__',()),) + (IEstoque,)
100
101
102    # This name appears in the 'add' box
103    archetype_name             = 'Estoque'
104
105    meta_type                  = 'Estoque'
106    portal_type                = 'Estoque'
107    allowed_content_types      = ['MovimentacaoEstoque']
108    filter_content_types       = 1
109    global_allow               = 0
110    allow_discussion           = 0
111    #content_icon               = 'Estoque.gif'
112    immediate_view             = 'base_view'
113    default_view               = 'base_view'
114    suppl_views                = ()
115    typeDescription            = "Estoque"
116    typeDescMsgId              = 'description_edit_estoque'
117
118    schema = Estoque_schema
119
120    ##code-section class-header #fill in your manual code here
121    ##/code-section class-header
122
123
124    #Methods
125    #methods from Interface IEstoque
126
127    security.declarePrivate('_titulo')
128    def _titulo(self):
129        """
130        Configuracao do titulo que esse objeto deseja disponibilizar.
131        """
132       
133        return str(self.getCod_item_material())
134
135
136
137registerType(Estoque,PROJECTNAME)
138# end of class Estoque
139
140##code-section module-footer #fill in your manual code here
141##/code-section module-footer
142
143
144
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.