source: publico/ILSAALMaterial/trunk/Estoque.py @ 1251

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

codigo regerado

File size: 4.6 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.00",
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_local_armazenamento',
65        widget=ReferenceWidget(
66            label='Cod_local_armazenamento',
67            label_msgid='ILSAALMaterial_label_cod_local_armazenamento',
68            description_msgid='ILSAALMaterial_help_cod_local_armazenamento',
69            i18n_domain='ILSAALMaterial',
70        ),
71        allowed_types=('Almoxarifado',),
72        multiValued=0,
73        relationship='Estoque_Almoxarifado'
74    ),
75
76
77    ReferenceField('cod_item_material',
78        widget=ReferenceWidget(
79            label='Cod_item_material',
80            label_msgid='ILSAALMaterial_label_cod_item_material',
81            description_msgid='ILSAALMaterial_help_cod_item_material',
82            i18n_domain='ILSAALMaterial',
83        ),
84        allowed_types=('Material',),
85        multiValued=0,
86        relationship='Estoque_Material'
87    ),
88
89),
90)
91
92
93##code-section after-local-schema #fill in your manual code here
94##/code-section after-local-schema
95
96Estoque_schema = BaseFolderSchema + \
97    schema
98
99##code-section after-schema #fill in your manual code here
100##/code-section after-schema
101
102class Estoque(BaseFolder):
103    """
104    Representa o estoque do material.
105    """
106    security = ClassSecurityInfo()
107    __implements__ = (getattr(BaseFolder,'__implements__',()),) + (IEstoque,)
108
109
110    # This name appears in the 'add' box
111    archetype_name             = 'Estoque'
112
113    meta_type                  = 'Estoque'
114    portal_type                = 'Estoque'
115    allowed_content_types      = ['MovimentacaoEstoque']
116    filter_content_types       = 1
117    global_allow               = 0
118    allow_discussion           = 0
119    #content_icon               = 'Estoque.gif'
120    immediate_view             = 'base_view'
121    default_view               = 'base_view'
122    suppl_views                = ()
123    typeDescription            = "Estoque"
124    typeDescMsgId              = 'description_edit_estoque'
125
126    schema = Estoque_schema
127
128    ##code-section class-header #fill in your manual code here
129    ##/code-section class-header
130
131
132    #Methods
133    #methods from Interface IEstoque
134
135    security.declarePrivate('_titulo')
136    def _titulo(self):
137        """
138        Configuracao do titulo que esse objeto deseja disponibilizar.
139        """
140       
141        return str(self.getCod_item_material()) + ': ' + str(self.getCod_local_armazenamento())
142
143
144
145registerType(Estoque,PROJECTNAME)
146# end of class Estoque
147
148##code-section module-footer #fill in your manual code here
149##/code-section module-footer
150
151
152
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.