Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 13345)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 13346)
@@ -4,4 +4,7 @@
 1.3.4.dev0 (unreleased)
 =======================
+
+* Remove `beds_reserved` attribute from hostels. Hostels do no longer
+  contain information about reserved bed spaces.
 
 * Add methods and page to release expired bed allocations.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 13345)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 13346)
@@ -265,5 +265,7 @@
         return
 
-    @action(_('Update all beds'), style='primary')
+    @action(_('Update all beds'), style='primary',
+            warning=_('Attention: The updater removes all reservation flags of existing beds.'
+                        ' You really want to update?'))
     def updateBeds(self, **data):
         removed, added, modified, modified_beds = self.context.updateBeds()
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt	(revision 13345)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt	(revision 13346)
@@ -21,14 +21,4 @@
       <tbody>
         <tal:widgets content="structure provider:widgets" />
-        <tr>
-          <td class="fieldname" i18n:translate="" >
-            Reserved Beds:
-          </td>
-          <td>
-            <tal:repeat repeat="bed context/beds_reserved" >
-                <span tal:replace='bed'>BED</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            </tal:repeat>
-          </td>
-        </tr>
       </tbody>
       </table>
@@ -79,5 +69,5 @@
       </table>
       <input type="checkbox" onClick="toggle(this, 'val_id')" />
-      <span  i18n:translate="">Select all</span>
+      &nbsp;<span  i18n:translate="">Select all</span>
       <br /><br />
       <div tal:condition="view/availableActions">
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelpage.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelpage.pt	(revision 13345)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelpage.pt	(revision 13346)
@@ -2,14 +2,4 @@
   <tbody>
     <tal:widgets content="structure provider:widgets" />
-    <tr>
-      <td class="fieldname" i18n:translate="" >
-        Reserved Beds:
-      </td>
-      <td>
-        <tal:repeat repeat="bed context/beds_reserved" >
-            <span tal:replace='bed'>BED</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-        </tal:repeat>
-      </td>
-    </tr>
   </tbody>
 </table>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py	(revision 13345)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py	(revision 13346)
@@ -90,5 +90,4 @@
         beds_for_final = getattr(self,'beds_for_final',[])
         beds_for_all = getattr(self,'beds_for_all',[])
-        beds_reserved = getattr(self,'beds_reserved',[])
         all_blocks = blocks_for_female + blocks_for_male
         all_beds = (beds_for_pre + beds_for_fresh +
@@ -103,7 +102,5 @@
                         room_nr = floor*100 + room
                         bt = 'all'
-                        if '%s_%s_%s' % (block,room_nr,bed) in beds_reserved:
-                            bt = "reserved"
-                        elif bed in beds_for_fresh:
+                        if bed in beds_for_fresh:
                             bt = 'fr'
                         elif bed in beds_for_pre:
@@ -218,31 +215,7 @@
                 bt = 're'
             bt = u'%s_%s_%s' % (sh, sex, bt)
-
-            # Comment of Martijn:
-            # If you have a non-Persistent subobject (like a list) and
-            # you change it, you need to manually flag the persistence
-            # machinery on the object that its subobject changed, with
-            # _p_changed. This is only necessary if some of the
-            # objects are not sublclasses of Persistent. For common
-            # built-in collections in Python such as list and
-            # dictionary there are replacements (PersistentList,
-            # PersistentMapping), and more advanced building blocks
-            # for indexes (BTrees), that don't have this issue.
-            #hostel._p_changed = True
-
-            # Henrik: Unfortunately, this doesn't work in our case.
-            # After restarting the portal,
-            # added or removed list items are gone. The only way to ensure
-            # persistance is to reassign the list attribute.
-            br = hostel.beds_reserved
-            br.remove(bed_string)
-            hostel.beds_reserved = br
             message = _(u'unreserved')
         else:
             bt = u'%s_%s_reserved' % (sh, sex)
-            # See comment above
-            br = hostel.beds_reserved
-            br.append(bed_string)
-            hostel.beds_reserved = br
             message = _(u'reserved')
         self.bed_type = bt
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py	(revision 13345)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py	(revision 13346)
@@ -122,15 +122,4 @@
         )
 
-    beds_reserved = schema.List(
-        title = _(u'Reserved Beds'),
-        value_type = schema.TextLine(
-            default = u'',
-            required = False,
-        ),
-        required = True,
-        readonly = False,
-        default = [],
-        )
-
     blocks_for_female = schema.List(
         title = _(u'Blocks for Female Students'),
@@ -138,4 +127,5 @@
             vocabulary = blocks
             ),
+        default = [],
         )
 
@@ -145,4 +135,5 @@
             vocabulary = blocks
             ),
+        default = [],
         )
 
@@ -152,4 +143,5 @@
             vocabulary = bed_letters
             ),
+        default = [],
         )
 
@@ -159,4 +151,5 @@
             vocabulary = bed_letters
             ),
+        default = [],
         )
 
@@ -166,4 +159,5 @@
             vocabulary = bed_letters
             ),
+        default = [],
         )
 
@@ -173,4 +167,5 @@
             vocabulary = bed_letters
             ),
+        default = [],
         )
 
@@ -180,4 +175,5 @@
             vocabulary = bed_letters
             ),
+        default = [],
         )
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/sample_hostel_data.csv
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/sample_hostel_data.csv	(revision 13345)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/sample_hostel_data.csv	(revision 13346)
@@ -1,11 +1,11 @@
-beds_for_all,beds_for_final,beds_for_fresh,beds_for_pre,beds_for_returning,beds_reserved,blocks_for_female,blocks_for_male,floors_per_block,hostel_id,hostel_name,rooms_per_floor,sort_id,special_handling
-[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",[],['A'],[],1,block-a-upper-hostel,Block A Upper Hostel,32,20,regular
-[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",[],['B'],[],1,block-b-upper-hostel,Block B Upper Hostel,32,30,regular
-[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",[],['C'],[],1,block-c-upper-hostel,Block C Upper Hostel,32,40,regular
-[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",[],['D'],[],1,block-d-upper-hostel,Block D Upper Hostel,32,50,regular
-[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",[],['E'],[],1,block-e-down-hostel,Block E Down Hostel,32,60,regular
-[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",[],['F'],[],1,block-f-down-hostel,Block F Down Hostel,32,70,regular
-[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",[],['G'],[],1,block-g-down-hostel,Block G Down Hostel,32,80,regular
-[],"['A', 'B']","['D', 'E']",['F'],['C'],[],[],"['A', 'B']",1,hall-a,Hall A,44,90,regular
-[],"['A', 'B']","['D', 'E']",['F'],['C'],[],[],"['C', 'D']",1,hall-b,Hall B,44,100,regular
-[],[],[],[],[],[],[],['A'],1,stores-32,Stores 32,16,10,regular
+beds_for_all,beds_for_final,beds_for_fresh,beds_for_pre,beds_for_returning,blocks_for_female,blocks_for_male,floors_per_block,hostel_id,hostel_name,rooms_per_floor,sort_id,special_handling
+[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",['A'],[],1,block-a-upper-hostel,Block A Upper Hostel,32,20,regular
+[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",['B'],[],1,block-b-upper-hostel,Block B Upper Hostel,32,30,regular
+[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",['C'],[],1,block-c-upper-hostel,Block C Upper Hostel,32,40,regular
+[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",['D'],[],1,block-d-upper-hostel,Block D Upper Hostel,32,50,regular
+[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",['E'],[],1,block-e-down-hostel,Block E Down Hostel,32,60,regular
+[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",['F'],[],1,block-f-down-hostel,Block F Down Hostel,32,70,regular
+[],"['A', 'B']","['E', 'F']",['G'],"['C', 'D']",['G'],[],1,block-g-down-hostel,Block G Down Hostel,32,80,regular
+[],"['A', 'B']","['D', 'E']",['F'],['C'],[],"['A', 'B']",1,hall-a,Hall A,44,90,regular
+[],"['A', 'B']","['D', 'E']",['F'],['C'],[],"['C', 'D']",1,hall-b,Hall B,44,100,regular
+[],[],[],[],[],[],['A'],1,stores-32,Stores 32,16,10,regular
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py	(revision 13345)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py	(revision 13346)
@@ -311,5 +311,4 @@
         self.assertEqual(self.app['hostels']['hall-1'][
             'hall-1_A_101_D'].bed_type, 'regular_female_reserved')
-        self.assertTrue('A_101_A&nbsp;&nbsp;' in self.browser.contents)
         # The catalog has been updated.
         results = cat.searchResults(
@@ -340,16 +339,8 @@
             bed_type=('regular_female_all', 'regular_female_all'))
         results = [(x.bed_id, x.bed_type) for x in results]
+        # The reservation of hall-1_A_101_D has been cancelled.
         self.assertEqual(results,
-            [(u'hall-1_B_101_D', u'regular_female_all'),])
-        # Unreserve beds.
-        ctrl = self.browser.getControl(name='val_id')
-        ctrl.getControl(value='hall-1_A_101_A').selected = True
-        ctrl.getControl(value='hall-1_A_101_B').selected = True
-        ctrl.getControl(value='hall-1_A_101_C').selected = True
-        ctrl.getControl(value='hall-1_A_101_D').selected = True
-        self.browser.getControl("Switch reservation", index=0).click()
-        assert self.app['hostels']['hall-1'][
-            'hall-1_A_101_D'].bed_type == 'regular_female_all'
-        self.assertFalse(expected in self.browser.contents)
+            [(u'hall-1_A_101_D', u'regular_female_all'),
+             (u'hall-1_B_101_D', u'regular_female_all')])
         # Release bed which has previously been booked.
         bedticket = BedTicket()
@@ -508,8 +499,8 @@
             result,
             'beds_for_all,beds_for_final,beds_for_fresh,beds_for_pre,'
-            'beds_for_returning,beds_reserved,blocks_for_female,'
+            'beds_for_returning,blocks_for_female,'
             'blocks_for_male,floors_per_block,hostel_id,hostel_name,maint_fee,'
-            'rooms_per_floor,sort_id,special_handling\r\n,,,,,[],,,1,'
-            'hall-x,Hall 1,0.0,2,10,regular\r\n'
+            'rooms_per_floor,sort_id,special_handling\r\n[],[],[],[],[],[],[],'
+            '1,hall-x,Hall 1,0.0,2,10,regular\r\n'
             )
         return
@@ -554,4 +545,5 @@
             "updated: "
             "beds_for_pre=['G'], floors_per_block=1, "
+            "special_handling=regular, "
             "beds_for_final=['A', 'B'], rooms_per_floor=32, "
             "hostel_id=block-a-upper-hostel, "
@@ -562,4 +554,9 @@
         shutil.rmtree(os.path.dirname(fin_file))
         shutil.rmtree(self.workdir)
+        # The manage page can be opened.
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.open(self.container_path + '/block-a-upper-hostel')
+        self.browser.getLink("Manage").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
         return
 
@@ -582,4 +579,5 @@
             "updated: "
             "beds_for_pre=['G'], floors_per_block=1, "
+            "special_handling=regular, "
             "beds_for_final=['A', 'B'], rooms_per_floor=32, "
             "hostel_id=block-a-upper-hostel, "
