Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9187)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9188)
@@ -1408,4 +1408,5 @@
     buttonname = _('Create bed ticket')
     notice = ''
+    with_ac = True
 
     def update(self, SUBMIT=None):
@@ -1448,13 +1449,15 @@
             self.redirect(self.url(self.context))
             return
-        self.ac_series = self.request.form.get('ac_series', None)
-        self.ac_number = self.request.form.get('ac_number', None)
+        if self.with_ac:
+            self.ac_series = self.request.form.get('ac_series', None)
+            self.ac_number = self.request.form.get('ac_number', None)
         if SUBMIT is None:
             return
-        pin = '%s-%s-%s' % (self.ac_prefix, self.ac_series, self.ac_number)
-        code = get_access_code(pin)
-        if not code:
-            self.flash(_('Activation code is invalid.'))
-            return
+        if self.with_ac:
+            pin = '%s-%s-%s' % (self.ac_prefix, self.ac_series, self.ac_number)
+            code = get_access_code(pin)
+            if not code:
+                self.flash(_('Activation code is invalid.'))
+                return
         # Search and book bed
         cat = queryUtility(ICatalog, name='beds_catalog', default=None)
@@ -1462,5 +1465,5 @@
             owner=(student.student_id,student.student_id))
         if len(entries):
-            # If bed space has bee manually allocated use this bed
+            # If bed space has been manually allocated use this bed
             bed = [entry for entry in entries][0]
         else:
@@ -1478,16 +1481,17 @@
                     mapping = {'a':acc_details['bt']}))
                 return
-        # Mark pin as used (this also fires a pin related transition)
-        if code.state == USED:
-            self.flash(_('Activation code has already been used.'))
-            return
-        else:
-            comment = _(u'invalidated')
-            # Here we know that the ac is in state initialized so we do not
-            # expect an exception, but the owner might be different
-            if not invalidate_accesscode(
-                pin,comment,self.context.student.student_id):
-                self.flash(_('You are not the owner of this access code.'))
+        if self.with_ac:
+            # Mark pin as used (this also fires a pin related transition)
+            if code.state == USED:
+                self.flash(_('Activation code has already been used.'))
                 return
+            else:
+                comment = _(u'invalidated')
+                # Here we know that the ac is in state initialized so we do not
+                # expect an exception, but the owner might be different
+                if not invalidate_accesscode(
+                    pin,comment,self.context.student.student_id):
+                    self.flash(_('You are not the owner of this access code.'))
+                    return
         # Create bed ticket
         bedticket = createObject(u'waeup.BedTicket')
