1 | # File: ItemRequisitado.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.IItemRequisitado import IItemRequisitado |
---|
28 | |
---|
29 | |
---|
30 | from Products.Archetypes.SQLStorage import * |
---|
31 | # additional imports from tagged value 'import' |
---|
32 | from Products.ILSAAL.saalapi import * |
---|
33 | |
---|
34 | from Products.ILSAALMaterial.config import * |
---|
35 | ##code-section module-header #fill in your manual code here |
---|
36 | ##/code-section module-header |
---|
37 | |
---|
38 | schema=Schema(( |
---|
39 | IntegerField('qtd_item_requisitada', |
---|
40 | widget=IntegerWidget( |
---|
41 | label="Item", |
---|
42 | description="Quantidade de itens requisitados.", |
---|
43 | label_msgid='ILSAALMaterial_label_qtd_item_requisitada', |
---|
44 | description_msgid='ILSAALMaterial_help_qtd_item_requisitada', |
---|
45 | i18n_domain='ILSAALMaterial', |
---|
46 | ), |
---|
47 | required=1 |
---|
48 | ), |
---|
49 | |
---|
50 | |
---|
51 | ReferenceField('cod_item_material', |
---|
52 | widget=ReferenceWidget( |
---|
53 | label='Cod_item_material', |
---|
54 | label_msgid='ILSAALMaterial_label_cod_item_material', |
---|
55 | description_msgid='ILSAALMaterial_help_cod_item_material', |
---|
56 | i18n_domain='ILSAALMaterial', |
---|
57 | ), |
---|
58 | allowed_types=('Material',), |
---|
59 | multiValued=0, |
---|
60 | relationship='ItemRequisitado_Material' |
---|
61 | ), |
---|
62 | |
---|
63 | ), |
---|
64 | ) |
---|
65 | |
---|
66 | |
---|
67 | ##code-section after-local-schema #fill in your manual code here |
---|
68 | ##/code-section after-local-schema |
---|
69 | |
---|
70 | ItemRequisitado_schema = BaseFolderSchema + \ |
---|
71 | schema |
---|
72 | |
---|
73 | ##code-section after-schema #fill in your manual code here |
---|
74 | ##/code-section after-schema |
---|
75 | |
---|
76 | class ItemRequisitado(BaseFolder): |
---|
77 | """ |
---|
78 | Representa o item requisitado. |
---|
79 | """ |
---|
80 | security = ClassSecurityInfo() |
---|
81 | __implements__ = (getattr(BaseFolder,'__implements__',()),) + (IItemRequisitado,) |
---|
82 | |
---|
83 | |
---|
84 | # This name appears in the 'add' box |
---|
85 | archetype_name = 'ItemRequisitado' |
---|
86 | |
---|
87 | meta_type = 'ItemRequisitado' |
---|
88 | portal_type = 'ItemRequisitado' |
---|
89 | allowed_content_types = ['ItemRequisitadoCancelado', 'ItemRequisitadoAtendido'] |
---|
90 | filter_content_types = 1 |
---|
91 | global_allow = 0 |
---|
92 | allow_discussion = 0 |
---|
93 | #content_icon = 'ItemRequisitado.gif' |
---|
94 | immediate_view = 'base_view' |
---|
95 | default_view = 'base_view' |
---|
96 | suppl_views = () |
---|
97 | typeDescription = "ItemRequisitado" |
---|
98 | typeDescMsgId = 'description_edit_itemrequisitado' |
---|
99 | |
---|
100 | schema = ItemRequisitado_schema |
---|
101 | |
---|
102 | ##code-section class-header #fill in your manual code here |
---|
103 | ##/code-section class-header |
---|
104 | |
---|
105 | |
---|
106 | #Methods |
---|
107 | #methods from Interface IItemRequisitado |
---|
108 | |
---|
109 | security.declarePrivate('_titulo') |
---|
110 | def _titulo(self): |
---|
111 | """ |
---|
112 | |
---|
113 | """ |
---|
114 | |
---|
115 | pass |
---|
116 | |
---|
117 | |
---|
118 | |
---|
119 | registerType(ItemRequisitado,PROJECTNAME) |
---|
120 | # end of class ItemRequisitado |
---|
121 | |
---|
122 | ##code-section module-footer #fill in your manual code here |
---|
123 | ##/code-section module-footer |
---|
124 | |
---|
125 | |
---|
126 | |
---|