Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt	(revision 1446)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt	(revision 1447)
@@ -48,5 +48,5 @@
                      />
             </td>
-            <td><a href="view" tal:attributes="href string:/${row/url}">
+            <td><a href="view" tal:attributes="href row/url">
               <strong tal:content="row/title" /></a> </td>
             <td tal:content="row/id"> </td>
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed.py	(revision 1446)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed.py	(revision 1447)
@@ -118,5 +118,6 @@
     if acco_id in student_obj.objectIds():
         acco_doc = getattr(student_obj, acco_id).getContent()
-        acco_doc.edit(mapping={'bed':bid + " (reservation cancelled by %s!)" % member})
+        if acco_doc.bed == bid:
+            acco_doc.edit(mapping={'bed':bid + " (reservation cancelled by %s!)" % member})
     logger.info('"%s","cancelled reservation %s by","%s"' % (member,bid,sid))
     psm = "%s removed from %s" % (student.name,bid)
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/fixReservedBeds.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/fixReservedBeds.py	(revision 1447)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/fixReservedBeds.py	(revision 1447)
@@ -0,0 +1,45 @@
+##parameters=REQUEST
+# $Id$
+"""
+process the the accommodation reservation
+"""
+import DateTime
+current = DateTime.DateTime()
+request = context.REQUEST
+pr = context.portal_registration
+wftool = context.portal_workflow
+lt = context.portal_layouts
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+acco_cat = context.portal_accommodation
+import logging
+logger = logging.getLogger('Accommodation.FixReservedBed')
+students = context.portal_url.getPortalObject().campus.students
+hostels = context.portal_url.getPortalObject().campus.accommodation.objectItems()
+acco_id = "accommodation_%s" % context.getSessionId()
+logger.info('"%s","start"' % (member))
+#from Products.zdb import set_trace;set_trace()
+for h_id,h in hostels:
+    h_doc = h.getContent()
+    reserved = context.reservedRoomsVoc(doc=h_doc)
+    for hr,hrv in reserved:
+        for k,v in context.getAccoHallBeds(doc=h_doc):
+            bid = "%s_%s_%s" % (h_id,hr,k)
+            res = acco_cat(bed = bid)
+            if not res:
+                continue
+            bed = res[0]
+            if not bed.student:
+                continue
+            student_obj = getattr(students,bed.student)
+            if acco_id in student_obj.objectIds():
+                acco_doc = getattr(student_obj, acco_id).getContent()
+                if acco_doc.bed != bid:
+                    acco_cat.modifyRecord(bed=bid,student = '')
+                    logger.info('"%s","removed allocation of %s for","%s"' % (member,bid,bed.student))
+logger.info('"%s","finished"' % (member))
+return request.RESPONSE.redirect("%s" % context.absolute_url())
+
+                
+    
+
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py	(revision 1446)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py	(revision 1447)
@@ -10,5 +10,5 @@
 # $Id$
 """
-return Info about the Faculties
+return Info about the Accommodation-Folder
 """
 request = context.REQUEST
@@ -29,5 +29,5 @@
     row['id'] = f.id
     row['title'] = f.Title
-    row['url'] = f.relative_path
+    row['url'] = "%s/%s" % (context.absolute_url(),f.id)
     #fo = f.getObject()
     #row['is_editable'] = mtool.checkPermission('Modify portal content', fo)
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoHallBeds.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoHallBeds.py	(revision 1446)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoHallBeds.py	(revision 1447)
@@ -1,3 +1,3 @@
-##parameters=key=None 
+##parameters=key=None,doc=None
 # $Id$
 """
@@ -5,5 +5,6 @@
 
 """
-doc = context.getContent()
+if doc is None:
+    doc = context.getContent()
 if key is None:
     return [(l,l) for l in 'ABCDEFGH'[:doc.beds_per_room]]
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/reservedRoomsVoc.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/reservedRoomsVoc.py	(revision 1446)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/reservedRoomsVoc.py	(revision 1447)
@@ -1,3 +1,3 @@
-##parameters=key=None
+##parameters=key=None,doc=None
 # $Id$
 """
@@ -5,7 +5,8 @@
 
 """
-doc = context.getContent()
-voc = [("_".join((r.split('/')[0],r.split('/')[1])),r)
-                      for r in doc.reserved_rooms.replace(' ','').split(',') if r]
+if doc is None:
+    doc = context.getContent()
+voc = [("_".join((r.split('/')[0].strip(),r.split('/')[1].strip())),r)
+                      for r in doc.reserved_rooms.split(',') if r]
 #from Products.zdb import set_trace;set_trace()
 if not key:
