1 | # File: ItemRequisitadoCancelado.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 ItemRequisitado import ItemRequisitado |
---|
28 | from Products.ILSAALMaterial.interfaces.IItemRequisitadoCancelado import IItemRequisitadoCancelado |
---|
29 | |
---|
30 | |
---|
31 | from Products.Archetypes.SQLStorage import * |
---|
32 | # additional imports from tagged value 'import' |
---|
33 | from DateTime import DateTime |
---|
34 | from Products.ILSAAL.saalapi import * |
---|
35 | |
---|
36 | from Products.ILSAALMaterial.config import * |
---|
37 | ##code-section module-header #fill in your manual code here |
---|
38 | ##/code-section module-header |
---|
39 | |
---|
40 | schema=Schema(( |
---|
41 | IntegerField('qtd_cancelado', |
---|
42 | widget=IntegerWidget( |
---|
43 | label="Quantidade Cancelada", |
---|
44 | description="Quantidade de itens requisitados que foram cancelados.", |
---|
45 | label_msgid='ILSAALMaterial_label_qtd_cancelado', |
---|
46 | description_msgid='ILSAALMaterial_help_qtd_cancelado', |
---|
47 | i18n_domain='ILSAALMaterial', |
---|
48 | ), |
---|
49 | required=1 |
---|
50 | ), |
---|
51 | |
---|
52 | DateTimeField('dat_cancelamento', |
---|
53 | widget=CalendarWidget( |
---|
54 | label="Data de cancelamento", |
---|
55 | description="Informe a data de cancelamento.", |
---|
56 | format="%d/%m/%Y", |
---|
57 | date_only=1, |
---|
58 | label_msgid='ILSAALMaterial_label_dat_cancelamento', |
---|
59 | description_msgid='ILSAALMaterial_help_dat_cancelamento', |
---|
60 | i18n_domain='ILSAALMaterial', |
---|
61 | ), |
---|
62 | required=1 |
---|
63 | ), |
---|
64 | |
---|
65 | StringField('des_motivo_cancelamento', |
---|
66 | widget=StringWidget( |
---|
67 | label='Des_motivo_cancelamento', |
---|
68 | label_msgid='ILSAALMaterial_label_des_motivo_cancelamento', |
---|
69 | description_msgid='ILSAALMaterial_help_des_motivo_cancelamento', |
---|
70 | i18n_domain='ILSAALMaterial', |
---|
71 | ) |
---|
72 | ), |
---|
73 | |
---|
74 | ), |
---|
75 | ) |
---|
76 | |
---|
77 | |
---|
78 | ##code-section after-local-schema #fill in your manual code here |
---|
79 | ##/code-section after-local-schema |
---|
80 | |
---|
81 | ItemRequisitadoCancelado_schema = BaseFolderSchema + \ |
---|
82 | getattr(ItemRequisitado,'schema',Schema(())) + \ |
---|
83 | schema |
---|
84 | |
---|
85 | ##code-section after-schema #fill in your manual code here |
---|
86 | ##/code-section after-schema |
---|
87 | |
---|
88 | class ItemRequisitadoCancelado(ItemRequisitado,BaseFolder): |
---|
89 | """ |
---|
90 | Representa um item requisitado que foi cancelado. |
---|
91 | """ |
---|
92 | security = ClassSecurityInfo() |
---|
93 | __implements__ = (getattr(ItemRequisitado,'__implements__',()),) + (getattr(BaseFolder,'__implements__',()),) + (IItemRequisitadoCancelado,) |
---|
94 | |
---|
95 | |
---|
96 | # This name appears in the 'add' box |
---|
97 | archetype_name = 'ItemRequisitadoCancelado' |
---|
98 | |
---|
99 | meta_type = 'ItemRequisitadoCancelado' |
---|
100 | portal_type = 'ItemRequisitadoCancelado' |
---|
101 | allowed_content_types = [] + list(getattr(ItemRequisitado, 'allowed_content_types', [])) |
---|
102 | filter_content_types = 1 |
---|
103 | global_allow = 0 |
---|
104 | allow_discussion = 0 |
---|
105 | #content_icon = 'ItemRequisitadoCancelado.gif' |
---|
106 | immediate_view = 'base_view' |
---|
107 | default_view = 'base_view' |
---|
108 | suppl_views = () |
---|
109 | typeDescription = "ItemRequisitadoCancelado" |
---|
110 | typeDescMsgId = 'description_edit_itemrequisitadocancelado' |
---|
111 | |
---|
112 | schema = ItemRequisitadoCancelado_schema |
---|
113 | |
---|
114 | ##code-section class-header #fill in your manual code here |
---|
115 | ##/code-section class-header |
---|
116 | |
---|
117 | |
---|
118 | #Methods |
---|
119 | #methods from Interface IItemRequisitadoCancelado |
---|
120 | |
---|
121 | security.declarePrivate('_titulo') |
---|
122 | def _titulo(self): |
---|
123 | """ |
---|
124 | |
---|
125 | """ |
---|
126 | |
---|
127 | pass |
---|
128 | |
---|
129 | |
---|
130 | |
---|
131 | registerType(ItemRequisitadoCancelado,PROJECTNAME) |
---|
132 | # end of class ItemRequisitadoCancelado |
---|
133 | |
---|
134 | ##code-section module-footer #fill in your manual code here |
---|
135 | ##/code-section module-footer |
---|
136 | |
---|
137 | |
---|
138 | |
---|