1 | # File: ItemEntrada.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 <admin-stc@interlegis.gov.br>''' |
---|
22 | __docformat__ = 'plaintext' |
---|
23 | |
---|
24 | |
---|
25 | from AccessControl import ClassSecurityInfo |
---|
26 | from Products.Archetypes.atapi import * |
---|
27 | from Products.ILSAALMaterial.interfaces.IItemEntrada import IItemEntrada |
---|
28 | |
---|
29 | |
---|
30 | from Products.Archetypes.SQLStorage import * |
---|
31 | # additional imports from tagged value 'import' |
---|
32 | from DateTime import DateTime |
---|
33 | from Products.ILSAAL.saalapi import * |
---|
34 | |
---|
35 | from Products.ILSAALMaterial.config import * |
---|
36 | ##code-section module-header #fill in your manual code here |
---|
37 | ##/code-section module-header |
---|
38 | |
---|
39 | schema=Schema(( |
---|
40 | IntegerField('qtd_item_entrada', |
---|
41 | widget=IntegerWidget( |
---|
42 | label="Quantidade", |
---|
43 | description="Quantidade de itens na entrada.", |
---|
44 | label_msgid='ILSAALMaterial_label_qtd_item_entrada', |
---|
45 | description_msgid='ILSAALMaterial_help_qtd_item_entrada', |
---|
46 | i18n_domain='ILSAALMaterial', |
---|
47 | ), |
---|
48 | required=1 |
---|
49 | ), |
---|
50 | |
---|
51 | FloatField('vlr_unitario_item_entrada', |
---|
52 | widget=DecimalWidget( |
---|
53 | label="Valor Unitario", |
---|
54 | description="Valor unitario do item.", |
---|
55 | label_msgid='ILSAALMaterial_label_vlr_unitario_item_entrada', |
---|
56 | description_msgid='ILSAALMaterial_help_vlr_unitario_item_entrada', |
---|
57 | i18n_domain='ILSAALMaterial', |
---|
58 | ), |
---|
59 | required=1 |
---|
60 | ), |
---|
61 | |
---|
62 | DateTimeField('dat_estorno_entrada', |
---|
63 | widget=CalendarWidget( |
---|
64 | label="Data de Estorno", |
---|
65 | description="Informe a data de estorno.", |
---|
66 | format="%d/%m/%Y", |
---|
67 | date_only=1, |
---|
68 | label_msgid='ILSAALMaterial_label_dat_estorno_entrada', |
---|
69 | description_msgid='ILSAALMaterial_help_dat_estorno_entrada', |
---|
70 | i18n_domain='ILSAALMaterial', |
---|
71 | ) |
---|
72 | ), |
---|
73 | |
---|
74 | |
---|
75 | ReferenceField('cod_item_material', |
---|
76 | widget=ReferenceWidget( |
---|
77 | label='Cod_item_material', |
---|
78 | label_msgid='ILSAALMaterial_label_cod_item_material', |
---|
79 | description_msgid='ILSAALMaterial_help_cod_item_material', |
---|
80 | i18n_domain='ILSAALMaterial', |
---|
81 | ), |
---|
82 | allowed_types=('Material',), |
---|
83 | multiValued=0, |
---|
84 | relationship='ItemEntrada_Material' |
---|
85 | ), |
---|
86 | |
---|
87 | ), |
---|
88 | ) |
---|
89 | |
---|
90 | |
---|
91 | ##code-section after-local-schema #fill in your manual code here |
---|
92 | ##/code-section after-local-schema |
---|
93 | |
---|
94 | ItemEntrada_schema = BaseSchema + \ |
---|
95 | schema |
---|
96 | |
---|
97 | ##code-section after-schema #fill in your manual code here |
---|
98 | ##/code-section after-schema |
---|
99 | |
---|
100 | class ItemEntrada(BaseContent): |
---|
101 | """ |
---|
102 | Representa um item da entrada de materiais. |
---|
103 | """ |
---|
104 | security = ClassSecurityInfo() |
---|
105 | __implements__ = (getattr(BaseContent,'__implements__',()),) + (IItemEntrada,) |
---|
106 | |
---|
107 | |
---|
108 | # This name appears in the 'add' box |
---|
109 | archetype_name = 'ItemEntrada' |
---|
110 | |
---|
111 | meta_type = 'ItemEntrada' |
---|
112 | portal_type = 'ItemEntrada' |
---|
113 | allowed_content_types = [] |
---|
114 | filter_content_types = 0 |
---|
115 | global_allow = 0 |
---|
116 | allow_discussion = 0 |
---|
117 | #content_icon = 'ItemEntrada.gif' |
---|
118 | immediate_view = 'base_view' |
---|
119 | default_view = 'base_view' |
---|
120 | suppl_views = () |
---|
121 | typeDescription = "ItemEntrada" |
---|
122 | typeDescMsgId = 'description_edit_itementrada' |
---|
123 | |
---|
124 | schema = ItemEntrada_schema |
---|
125 | |
---|
126 | ##code-section class-header #fill in your manual code here |
---|
127 | ##/code-section class-header |
---|
128 | |
---|
129 | |
---|
130 | #Methods |
---|
131 | #methods from Interface IItemEntrada |
---|
132 | |
---|
133 | security.declarePrivate('_titulo') |
---|
134 | def _titulo(self): |
---|
135 | """ |
---|
136 | |
---|
137 | """ |
---|
138 | |
---|
139 | pass |
---|
140 | |
---|
141 | |
---|
142 | |
---|
143 | registerType(ItemEntrada,PROJECTNAME) |
---|
144 | # end of class ItemEntrada |
---|
145 | |
---|
146 | ##code-section module-footer #fill in your manual code here |
---|
147 | ##/code-section module-footer |
---|
148 | |
---|
149 | |
---|
150 | |
---|