source: publico/ILSAALRecursosHumanos/trunk/Afastamento.py @ 1200

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

gerado a partir do novo modelo

File size: 4.3 KB
Linha 
1# File: Afastamento.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.ILSAALRecursosHumanos.interfaces.IAfastamento import IAfastamento
28
29from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary
30
31from Products.Archetypes.SQLStorage import *
32# additional imports from tagged value 'import'
33from Products.ILSAAL.saalapi import *
34
35from Products.ILSAALRecursosHumanos.config import *
36##code-section module-header #fill in your manual code here
37##/code-section module-header
38
39schema=Schema((
40    StringField('cod_motivo',
41        widget=SelectionWidget(
42            label="Codigo do Motivo",
43            description="Preencha o Motivo.",
44            format="select",
45            label_msgid='ILSAALRecursosHumanos_label_cod_motivo',
46            description_msgid='ILSAALRecursosHumanos_help_cod_motivo',
47            i18n_domain='ILSAALRecursosHumanos',
48        ),
49        required=1,
50        vocabulary=NamedVocabulary("""codigo_motivo"""),
51        enforceVocabulary=1
52    ),
53
54    DateTimeField('dat_inicio',
55        widget=CalendarWidget(
56            label="Data de Inicio",
57            description="Preencha a Dara de Inicio.",
58            label_msgid='ILSAALRecursosHumanos_label_dat_inicio',
59            description_msgid='ILSAALRecursosHumanos_help_dat_inicio',
60            i18n_domain='ILSAALRecursosHumanos',
61        ),
62        required=1
63    ),
64
65    DateTimeField('dat_termino',
66        widget=CalendarWidget(
67            label="Data Termino",
68            description="Preencha a Data Termino.",
69            label_msgid='ILSAALRecursosHumanos_label_dat_termino',
70            description_msgid='ILSAALRecursosHumanos_help_dat_termino',
71            i18n_domain='ILSAALRecursosHumanos',
72        )
73    ),
74
75),
76)
77
78
79##code-section after-local-schema #fill in your manual code here
80##/code-section after-local-schema
81
82Afastamento_schema = BaseSchema + \
83    schema
84
85##code-section after-schema #fill in your manual code here
86##/code-section after-schema
87
88class Afastamento(BaseContent):
89    security = ClassSecurityInfo()
90    __implements__ = (getattr(BaseContent,'__implements__',()),) + (IAfastamento,)
91
92
93    # This name appears in the 'add' box
94    archetype_name             = 'Afastamento'
95
96    meta_type                  = 'Afastamento'
97    portal_type                = 'Afastamento'
98    allowed_content_types      = []
99    filter_content_types       = 0
100    global_allow               = 1
101    allow_discussion           = 0
102    #content_icon               = 'Afastamento.gif'
103    immediate_view             = 'base_view'
104    default_view               = 'base_view'
105    suppl_views                = ()
106    typeDescription            = "Afastamento"
107    typeDescMsgId              = 'description_edit_afastamento'
108
109    schema = Afastamento_schema
110
111    ##code-section class-header #fill in your manual code here
112    ##/code-section class-header
113
114
115    #Methods
116    #methods from Interface IAfastamento
117
118    security.declarePrivate('_titulo')
119    def _titulo(self):
120        """
121        Configuracao do titulo que esse objeto deseja disponibilizar.
122        """
123       
124        return str(self.getDat_inicio())
125
126
127    #manually created methods
128
129    security.declarePublic('Title')
130    def Title(self):
131        """
132       
133        """
134       
135        pass
136
137
138
139registerType(Afastamento,PROJECTNAME)
140# end of class Afastamento
141
142##code-section module-footer #fill in your manual code here
143##/code-section module-footer
144
145
146
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.