source: publico/ILSAAL/trunk/SAAL.py @ 654

Última Alteração nesse arquivo desde 654 foi 654, incluída por jeanferri, 15 anos atrás

Resolvido o ticket #54 implementando ID único para o containter do SAAL e removendo-o do menu de adição

File size: 3.4 KB
Linha 
1# File: SAAL.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
25from AccessControl import ClassSecurityInfo
26from Products.Archetypes.atapi import *
27from Products.CMFCore.utils import UniqueObject
28from Products.ILSAAL.interfaces.ISAAL import ISAAL
29
30
31from Products.Archetypes.SQLStorage import *
32from Products.ILSAAL.config import *
33##code-section module-header #fill in your manual code here
34##/code-section module-header
35
36schema=Schema((
37),
38)
39
40
41##code-section after-local-schema #fill in your manual code here
42##/code-section after-local-schema
43
44SAAL_schema = OrderedBaseFolderSchema + \
45    getattr(UniqueObject,'schema',Schema(())) + \
46    schema
47
48##code-section after-schema #fill in your manual code here
49##/code-section after-schema
50
51class SAAL(UniqueObject,OrderedBaseFolder):
52    """
53    Container geral de objetos do sistema Interlegis SAAL.
54    """
55    security = ClassSecurityInfo()
56    __implements__ = (getattr(UniqueObject,'__implements__',()),) + (getattr(OrderedBaseFolder,'__implements__',()),) + (ISAAL,)
57
58
59    # This name appears in the 'add' box
60    archetype_name             = 'SAAL'
61
62    meta_type                  = 'SAAL'
63    portal_type                = 'SAAL'
64    allowed_content_types      = ['AutorizacoesPagamento', 'Bancos', 'CredoresDevedores', 'LivroCaixa', 'ResponsaveisContaCorrente', 'CasasLegislativa', 'Dependentes', 'Empregados', 'Sindicatos', 'UnidadesCentroCusto', 'Sefips', 'Pensionistas', 'Fornecedores', 'Inventarios', 'LocaisArmazenamento', 'Requisitantes', 'Requisicoes', 'Materiais', 'CasasLegislativas', 'UnidadesOrcamentarias', 'LeisOrcamentariasAprovadas', 'ClassificacoesOrcamentarias'] + list(getattr(UniqueObject, 'allowed_content_types', []))
65    filter_content_types       = 1
66    global_allow               = 0
67    allow_discussion           = 0
68    content_icon               = 'saal_icon.gif'
69    immediate_view             = 'base_view'
70    default_view               = 'base_view'
71    suppl_views                = ()
72    typeDescription            = "Sistema SAAL"
73    typeDescMsgId              = 'description_edit_saal'
74
75    schema = SAAL_schema
76
77    ##code-section class-header #fill in your manual code here
78    ##/code-section class-header
79
80
81    #Methods
82
83    # Use class/module security defaults
84    def __init__(self,id=None):
85        """
86        Construtor da classe. Fixa o id para nao ser mais alterado.
87        """
88       
89        OrderedBaseFolder.__init__(self, 'saal')
90
91
92registerType(SAAL,PROJECTNAME)
93# end of class SAAL
94
95##code-section module-footer #fill in your manual code here
96##/code-section module-footer
97
98
99
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.