Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 13444)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 13445)
@@ -22,4 +22,5 @@
 from zope.i18n import translate
 from zope.component import getUtility
+from zope.catalog.interfaces import ICatalog
 from waeup.kofa.browser.layout import (
     KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
@@ -162,4 +163,12 @@
     @action(_('Save'), style='primary')
     def save(self, **data):
+        if data['accommodation_session'] != self.context.accommodation_session:
+            catalog = getUtility(ICatalog, name='beds_catalog')
+            beds = catalog.searchResults(bed_type=(None,None))
+            if len(beds):
+                self.flash(_('You can\'t change the booking session '
+                             'before clearing all hostels.'),
+                           type='warning')
+                return
         self.applyData(self.context, **data)
         self.flash(_('Settings have been saved.'))
Index: /main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py	(revision 13444)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py	(revision 13445)
@@ -215,4 +215,11 @@
             self.app['hostels']['hall-x']['hall_block_room_bed'].owner,
             NOT_OCCUPIED)
+        # Accommodation session can't be changed if hostels are not empty.
+        self.browser.open(self.manage_container_path)
+        self.browser.getControl(name="form.accommodation_session").value = ['2005']
+        self.browser.getControl("Save").click()
+        self.assertTrue(
+            'You can\'t change the booking session before clearing all hostels'
+            in self.browser.contents)
         # Releasing is logged.
         logcontent = open(self.logfile).read()
