Index: /WAeUP_SRP/trunk/Accommodation.py
===================================================================
--- /WAeUP_SRP/trunk/Accommodation.py	(revision 625)
+++ /WAeUP_SRP/trunk/Accommodation.py	(revision 626)
@@ -39,4 +39,5 @@
         generated = []
         generated.append('"Bed","BedType","Student"' % vars())
+        beds_generated = []
         for h in l:
             halls.append(h.getObject())
@@ -44,6 +45,8 @@
             #import pdb;pdb.set_trace()
             h = hall.getContent()
+            hall_gen = {}
+            hall_gen['name'] = hall.getId()
+            count = 0
             reserved = [int(r) for r in h.reserved_rooms.split()]
-            print h.which_sex
             sex = 'male'
             if h.which_sex:
@@ -65,10 +68,16 @@
                             bt = "%(sex)s_%(bt)s" % vars()
                             uid = '%s_%d_%d_%s' % (hall.getId(),block,room_nr,bed)
-                            print bt,uid
-                            freelist.addRecord(bed = uid, bed_type = bt, student= '')
-                            generated.append('"%(uid)s","%(bt)s"' % vars())
+                            try:
+                                freelist.addRecord(bed = uid, bed_type = bt,hall =hall.getId())
+                                count +=1
+                                generated.append('"%(uid)s","%(bt)s"' % vars())
+                            except ValueError:
+                                freelist.modifyRecord(bed = uid, bed_type = bt,hall =hall.getId())
+                                pass
+            hall_gen['count']= count
+            beds_generated.append(hall_gen)
         current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
         open("%s/import/bedlist_%s.csv" % (i_home,current),"w+").write('\n'.join(generated))
-        return self.accommodation.academics_contents()
+        return self.accommodation.accommodation_view(beds_generated=beds_generated)
 
 ###)
Index: /WAeUP_SRP/trunk/profiles/default/accommodation.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/accommodation.xml	(revision 625)
+++ /WAeUP_SRP/trunk/profiles/default/accommodation.xml	(revision 626)
@@ -3,4 +3,5 @@
  <column value="bed"/>
  <column value="bed_type"/>
+ <column value="hall"/>
  <column value="student"/>
  <index name="bed" meta_type="FieldIndex">
@@ -13,3 +14,6 @@
   <indexed_attr value="student"/>
  </index>
+ <index name="hall" meta_type="FieldIndex">
+  <indexed_attr value="hall"/>
+ </index>
 </object>
Index: /WAeUP_SRP/trunk/profiles/default/types/AccoFolder.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/AccoFolder.xml	(revision 625)
+++ /WAeUP_SRP/trunk/profiles/default/types/AccoFolder.xml	(revision 626)
@@ -8,5 +8,5 @@
  <property name="product">WAeUP_SRP</property>
  <property name="factory">addAccoFolder</property>
- <property name="immediate_view">academics_contents</property>
+ <property name="immediate_view">accommodation_index</property>
  <property name="global_allow">True</property>
  <property name="filter_content_types">True</property>
@@ -32,5 +32,5 @@
  <alias from="view" to="accommodation_index"/>
  <action title="View" action_id="view" category="object" condition_expr=""
-    url_expr="string:${object_url}/academics_contents" visible="True">
+    url_expr="string:${object_url}/accommodation_index" visible="True">
   <permission value="View"/>
  </action>
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_view.pt	(revision 625)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/accommodation_view.pt	(revision 626)
@@ -1,4 +1,5 @@
 <metal:html tal:define="info context/getAccoHallsInfo;
-            is_manager info/is_manager|nothing;"
+            is_manager info/is_manager|nothing;
+            beds_generated options/beds_generated|nothing"
             >
   <metal:body use-macro="here/waeup_content_master/macros/master">
@@ -12,4 +13,36 @@
         Page Title
       </h3>
+      <table tal:condition="beds_generated">
+        <tr>
+          <th>Hall</th>
+          <th>Beds generated</th>
+        </tr>
+        <tr tal:repeat="hall beds_generated">
+          <td tal:content="hall/name"></td>
+          <td align="right" tal:content="hall/count"></td>
+        </tr>
+      </table>
+      <table tal:condition="info/bed_types"
+             tal:define="bed_types info/bed_types">
+        <tr>
+          <th>Bed Type</th>
+          <th>Beds</th>
+        </tr>
+        <tr tal:repeat="bt bed_types">
+          <td tal:content="bt/name" />
+          <td tal:content="bt/count" />
+        </tr>
+      </table>
+      <table tal:condition="info/reserved"
+             tal:define="reserved info/reserved">
+        <tr>
+          <th>Student</th>
+          <th>Bed</th>
+        </tr>
+        <tr tal:repeat="bt reserved">
+          <td tal:content="bt/student" />
+          <td tal:content="bt/bed" />
+        </tr>
+      </table>
     </metal:block>
     <metal:main fill-slot="main">
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoHallsInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoHallsInfo.py	(revision 625)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoHallsInfo.py	(revision 626)
@@ -35,3 +35,19 @@
     items.append(row)
 info['items'] = items
+pa = context.portal_accommodation
+bed_types = pa.uniqueValuesFor('bed_type')
+bt_list = []
+for bt in bed_types:
+    res = pa(bed_type=bt)
+    bt_list.append({'name': bt, 'count': len(res)})
+info['bed_types'] = bt_list
+reserved = pa.uniqueValuesFor('student')
+res_list = []
+if reserved > 1:
+    for st in reserved:
+        if st:
+            res = pa(student=st)
+            bt_list.append({'student': st, 'bed': res[0].bed })
+info['reserved'] = res_list
+
 return info
