## Script (Python) "cpsdocument_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## # $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $ """ return the Prefix for hostel maintenance scratchcards """ info = context.getStudentInfo() prefix = "" if not info['acco']: return prefix bed = info['acco_doc'].bed hall,block,room,letter = bed.split('_') res = context.portal_catalog(portal_type="AccoHall",id=hall) if res and len(res) == 1: prefix = res[0].getObject().getContent().maintenance_code return prefix