#-*- mode: python; mode: fold -*- from Globals import InitializeClass from AccessControl import ClassSecurityInfo from Products.CMFCore.utils import UniqueObject, getToolByName from Products.CMFCore.permissions import View from Products.CMFCore.permissions import ModifyPortalContent from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder #from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument from Products.CPSDocument.CPSDocument import CPSDocument from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder from Products.WAeUP_SRP.WAeUPTables import AccommodationTable import Globals import DateTime import re p_home = Globals.package_home(globals()) i_home = Globals.INSTANCE_HOME class PaymentsFolder(CPSDocument): ###( """ WAeUP PaymentsFolder containing Paymentsmmodation halls """ meta_type = 'PaymentsFolder' portal_type = meta_type security = ClassSecurityInfo() security.declareProtected(View,"Title") def Title(self): """compose title""" return "Payments Section" ###) InitializeClass(PaymentsFolder) def addPaymentsFolder(container, id, REQUEST=None, **kw): """Add a PaymentsFolder.""" ob = PaymentsFolder(id, **kw) return CPSBase_adder(container, ob, REQUEST=REQUEST) ###) class Payment(CPSDocument): ###( """ WAeUP Payment containing Departments """ meta_type = 'Payment' portal_type = meta_type security = ClassSecurityInfo() security.declareProtected(View,"Title") ###( def Title(self): """compose title""" content = self.getContent() heading = getattr(content,'heading',None) if heading is None: return self.title return heading ###) InitializeClass(Payment) def addPayment(container, id, REQUEST=None, **kw): """Add a Payment.""" ob = Payment(id, **kw) return CPSBase_adder(container, ob, REQUEST=REQUEST) ###)