Index: /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 641)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 642)
@@ -8,5 +8,5 @@
  <property name="product">WAeUP_SRP</property>
  <property name="factory">addStudentAccommodation</property>
- <property name="immediate_view">student_index</property>
+ <property name="immediate_view">hostal_reservation_slip</property>
  <property name="global_allow">True</property>
  <property name="filter_content_types">True</property>
@@ -26,8 +26,8 @@
  <property name="storage_methods"/>
  <property name="cps_is_portlet">False</property>
- <alias from="(Default)" to="student_index"/>
- <alias from="view" to="student_index"/>
+ <alias from="(Default)" to="hostal_reservation_slip"/>
+ <alias from="view" to="hostal_reservation_slip"/>
  <action title="Standard View" action_id="view" category="object"
-    condition_expr="" url_expr="string:${object_url}/student_index"
+    condition_expr="" url_expr="string:${object_url}/hostal_reservation_slip"
     visible="True">
   <permission value="View"/>
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py	(revision 642)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py	(revision 642)
@@ -0,0 +1,8 @@
+##parameters=bed
+# $Id: apply_admission.py 543 2006-09-24 07:44:32Z henrik $
+"""
+format the bed for readability
+"""
+
+hall,block,room,letter = bed.split('_')
+return "Bed %s in Room %s in Block %s in Hall %s" % (letter,room,block,hall)
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py	(revision 641)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py	(revision 642)
@@ -19,5 +19,5 @@
 student = info['student']
 if info['acco']:
-    return student.hostal_reservation_slip()
+    return context.REQUEST.RESPONSE.redirect("%s" % info['acco'].absolute_url())
 res,psm,ds = lt.renderLayout(layout_id= 'student_acco_reserve',
                       schema_id= 'student_acco_reserve',
@@ -47,7 +47,8 @@
     s_id = ds.get('s_id')
     pin = str(ds.get('acco_res_ac_pin'))
+    
     pa = context.portal_accommodation
     code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
-    if code < -10:
+    if code < 0:
         return context.reserve_acco_form(rendered = res,
                                  psm = bed,
@@ -58,14 +59,14 @@
 student.invokeFactory('StudentAccommodation',acco_id)
 acco = getattr(student,acco_id)
-ds['acco_res_date'] = current
-ds['bed'] = bed
-ds['session'] = session
+ds.set('acco_res_date', current)
+ds.set('bed', bed)
+ds.set('session', session)
 acco.getContent().edit(mapping=ds)
-return student.hostal_reservation_slip()
-return context.reserve_acco_form(rendered = res,
-                                 psm = "successfully reserved bed %s" % bed,
-                                 firstlayout = True,
-                                 lastlayout = True,
-                                 ds = ds,
-                                 )
+return context.REQUEST.RESPONSE.redirect("%s/hostal_reservation_slip" % student.absolute_url())
+##return context.reserve_acco_form(rendered = res,
+##                                 psm = "successfully reserved bed %s" % bed,
+##                                 firstlayout = True,
+##                                 lastlayout = True,
+##                                 ds = ds,
+##                                 )
 
