source: WAeUP_SRP/trunk/Payment.py @ 1239

Last change on this file since 1239 was 1239, checked in by Henrik Bettermann, 18 years ago

search_students now from uniben

  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1#-*- mode: python; mode: fold -*-
2from Globals import InitializeClass
3from AccessControl import ClassSecurityInfo
4
5from Products.CMFCore.utils import UniqueObject, getToolByName
6from Products.CMFCore.permissions import View
7from Products.CMFCore.permissions import ModifyPortalContent
8from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
9#from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
10from Products.CPSDocument.CPSDocument import CPSDocument
11from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder
12from Products.WAeUP_SRP.WAeUPTables import AccommodationTable
13import Globals
14import DateTime
15import re
16p_home = Globals.package_home(globals())
17i_home = Globals.INSTANCE_HOME
18
19class PaymentsFolder(CPSDocument): ###(
20    """
21    WAeUP PaymentsFolder containing Paymentsmmodation halls
22    """
23    meta_type = 'PaymentsFolder'
24    portal_type = meta_type
25    security = ClassSecurityInfo()
26
27    security.declareProtected(View,"Title")
28    def Title(self):
29        """compose title"""
30        return "Payments"
31
32###)
33
34InitializeClass(PaymentsFolder)
35
36def addPaymentsFolder(container, id, REQUEST=None, **kw):
37    """Add a PaymentsFolder."""
38    ob = PaymentsFolder(id, **kw)
39    return CPSBase_adder(container, ob, REQUEST=REQUEST)
40###)
41
42class Payment(CPSDocument): ###(
43    """
44    WAeUP Payment containing Departments
45    """
46    meta_type = 'Payment'
47    portal_type = meta_type
48    security = ClassSecurityInfo()
49
50    security.declareProtected(View,"Title") ###(
51    def Title(self):
52        """compose title"""
53        content = self.getContent()
54        heading = getattr(content,'heading',None)
55        if heading is None:
56            return self.title
57        return heading
58
59###)
60
61InitializeClass(Payment)
62
63def addPayment(container, id, REQUEST=None, **kw):
64    """Add a Payment."""
65    ob = Payment(id, **kw)
66    return CPSBase_adder(container, ob, REQUEST=REQUEST)
67###)
Note: See TracBrowser for help on using the repository browser.