Index: WAeUP_SRP/trunk/skins/waeup_fceokene/accommodation_record_slip.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_fceokene/accommodation_record_slip.pt	(revision 5788)
+++ WAeUP_SRP/trunk/skins/waeup_fceokene/accommodation_record_slip.pt	(revision 5792)
@@ -33,6 +33,9 @@
               <span class="dlabel">Bed</span>:
              </td>
-             <td> 
+             <td tal:condition="python:info_acco['Booking Status']=='maintenance_fee_paid'"> 
                 <span tal:content="python:context.getFormattedBed(info_acco['Bed'])"></span>
+             </td>
+             <td tal:condition="python:info_acco['Booking Status']!='maintenance_fee_paid'"> 
+                <em>visible after payment</em>
              </td>
          </tr>
@@ -70,5 +73,5 @@
              </td>
          </tr>                     
-      
+
          <tr>
              <td width="180px" valign="top">
Index: WAeUP_SRP/trunk/skins/waeup_fceokene/book_accommodation.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_fceokene/book_accommodation.py	(revision 5788)
+++ WAeUP_SRP/trunk/skins/waeup_fceokene/book_accommodation.py	(revision 5792)
@@ -70,5 +70,4 @@
                                  )
 elif psm == 'valid':
-    pin = str(ds.get('acco_res_sc_pin'))
     code,bed = context.portal_accommodation.searchAndReserveBed(student_id,
                                                                 "%s" % (info['student_status']),
@@ -95,5 +94,5 @@
 hall_info = context.waeup_tool.getHallInfo(bed)
 data={}
-data['acco_res_sc_pin'] = ds['acco_res_sc_pin']
+data['acco_res_sc_pin'] = str(ds.get('acco_res_sc_pin',''))
 data['acco_maint_code'] = hall_info.get('maintenance_code')
 data['acco_maint_fee'] = hall_info.get('maintenance_fee')
Index: WAeUP_SRP/trunk/skins/waeup_fceokene/getAccommodationRecords.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_fceokene/getAccommodationRecords.py	(revision 5792)
+++ WAeUP_SRP/trunk/skins/waeup_fceokene/getAccommodationRecords.py	(revision 5792)
@@ -0,0 +1,78 @@
+## Script (Python) "getAccommodationRecords"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student_id=None
+##title=
+##
+# $Id$
+"""
+"""
+import logging
+logger = logging.getLogger('Skins.getAccommodationRecords')
+import DateTime
+
+pprops = context.portal_properties
+booking_disabled = not pprops.enable_acco_booking
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+path_info = request.get('PATH_INFO').split('/')
+portal_session = context.getSessionId()[0]
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+if student_id is None:
+    requested_id = context.getStudentId()
+    if requested_id and not context.isStaff() and member_id != requested_id:
+        logger.info('%s tried to access %s' % (member_id,requested_id))
+        return None
+    elif context.isStaff():
+        student_id = requested_id
+    else:
+        student_id = member_id
+student_record = context.students_catalog.getRecordByKey(student_id)
+if student_record is None:
+    logger.info('%s not found in students_catalog' % student_id)
+    return None
+
+info['is_so'] = context.isSectionOfficer()
+info['is_student'] = context.isStudent()
+info['student_name'] = student_record.name    
+student_path = "%s/campus/students/%s" % (context.portal_url(),student_id)
+accommodation_records = context.accommodation_catalog(student_id = student_id)
+accommodations = []
+for ar in accommodation_records:
+    row = {}
+    row['sort_param'] = ar.session[-2:]  # in 2006 we used the session attribute was 2006 and not 06
+    row['session'] = ar.session
+    row['bed'] = ar.bed
+    row['reservation_status'] = ar.reservation_status
+    row['paid'] = ar.reservation_status == 'maintenance_fee_paid'
+    # Okene special
+    if not row['paid']:
+        row['bed'] = 'visible after payment'
+    row['current_unpaid'] = not row['paid'] and ar.session == portal_session
+    row['url'] = student_path
+    row['cancellation_allowed'] = info['is_so'] and ar.session == portal_session
+    row['relocation_allowed'] = info['is_so'] and ar.session == portal_session
+    accommodations.append(row)
+
+accommodations.sort(cmp=lambda x,y: cmp(x['sort_param'],y['sort_param']))
+
+info['accommodations'] = accommodations
+
+as = context.getAccommodationStatus()
+info['booking_allowed'] = as['booking_allowed']
+info['booking_disabled'] = as['booking_disabled']
+
+return info
+                 
+    
+    
