source: publico/ILSAALMaterial/trunk/Requisitante.py @ 1111

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

titulo alterado

File size: 5.0 KB
Linha 
1# File: Requisitante.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.IRequisitante import IRequisitante
28
29
30from Products.Archetypes.SQLStorage import *
31# additional imports from tagged value 'import'
32from DateTime import DateTime
33from Products.ILSAAL.saalapi import *
34
35from Products.ILSAALMaterial.config import *
36##code-section module-header #fill in your manual code here
37##/code-section module-header
38
39schema=Schema((
40    StringField('cod_matricula_req',
41        widget=StringWidget(
42            label="Matricula",
43            description="Informe a matricula do requisitante.",
44            label_msgid='ILSAALMaterial_label_cod_matricula_req',
45            description_msgid='ILSAALMaterial_help_cod_matricula_req',
46            i18n_domain='ILSAALMaterial',
47        ),
48        required=1
49    ),
50
51    StringField('nom_requisitante',
52        widget=StringWidget(
53            label="Nome",
54            description="Informe o nome do requisitante.",
55            label_msgid='ILSAALMaterial_label_nom_requisitante',
56            description_msgid='ILSAALMaterial_help_nom_requisitante',
57            i18n_domain='ILSAALMaterial',
58        ),
59        required=1
60    ),
61
62    DateTimeField('dat_inicio',
63        default=DateTime(),
64        widget=CalendarWidget(
65            label="Inicio",
66            description="Informe a data de inicio da requisicao.",
67            format="%d/%m/%Y",
68            date_only=1,
69            label_msgid='ILSAALMaterial_label_dat_inicio',
70            description_msgid='ILSAALMaterial_help_dat_inicio',
71            i18n_domain='ILSAALMaterial',
72        ),
73        required=1
74    ),
75
76    DateTimeField('dat_termino',
77        default=DateTime(),
78        widget=CalendarWidget(
79            label="Termino",
80            description="Informe a data final da requisicao.",
81            format="%d/%m/%Y",
82            date_only=1,
83            label_msgid='ILSAALMaterial_label_dat_termino',
84            description_msgid='ILSAALMaterial_help_dat_termino',
85            i18n_domain='ILSAALMaterial',
86        )
87    ),
88
89
90    ReferenceField('cod_local',
91        widget=ReferenceWidget(
92            label='Cod_local',
93            label_msgid='ILSAALMaterial_label_cod_local',
94            description_msgid='ILSAALMaterial_help_cod_local',
95            i18n_domain='ILSAALMaterial',
96        ),
97        allowed_types=('LocalRequisitante',),
98        multiValued=0,
99        relationship='Requisitante_LocalRequisitante'
100    ),
101
102),
103)
104
105
106##code-section after-local-schema #fill in your manual code here
107##/code-section after-local-schema
108
109Requisitante_schema = BaseSchema + \
110    schema
111
112##code-section after-schema #fill in your manual code here
113##/code-section after-schema
114
115class Requisitante(BaseContent):
116    """
117    Representa o ator requisitante.
118    """
119    security = ClassSecurityInfo()
120    __implements__ = (getattr(BaseContent,'__implements__',()),) + (IRequisitante,)
121
122
123    # This name appears in the 'add' box
124    archetype_name             = 'Requisitante'
125
126    meta_type                  = 'Requisitante'
127    portal_type                = 'Requisitante'
128    allowed_content_types      = []
129    filter_content_types       = 0
130    global_allow               = 0
131    allow_discussion           = 0
132    #content_icon               = 'Requisitante.gif'
133    immediate_view             = 'base_view'
134    default_view               = 'base_view'
135    suppl_views                = ()
136    typeDescription            = "Requisitante"
137    typeDescMsgId              = 'description_edit_requisitante'
138
139    schema = Requisitante_schema
140
141    ##code-section class-header #fill in your manual code here
142    ##/code-section class-header
143
144
145    #Methods
146    #methods from Interface IRequisitante
147
148    security.declarePrivate('_titulo')
149    def _titulo(self):
150        """
151        Configuracao do titulo que esse objeto deseja disponibilizar.
152        """
153       
154        return self.getResponsavel()
155
156
157
158registerType(Requisitante,PROJECTNAME)
159# end of class Requisitante
160
161##code-section module-footer #fill in your manual code here
162##/code-section module-footer
163
164
165
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.