Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py	(revision 9451)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py	(revision 9452)
@@ -113,4 +113,5 @@
         # append history
         data.extend(creator.fromStringList(self.context.history.messages))
+        data.append(Spacer(1, 20))
 
         # append photograph
Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py	(revision 9451)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py	(revision 9452)
@@ -212,5 +212,4 @@
         for msg in string_list:
             result.append(Paragraph(msg, CODE_STYLE))
-        result.append(Spacer(1, 20))
         return result
 
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9451)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9452)
@@ -597,8 +597,8 @@
     """
     grok.context(IStudent)
-    grok.name('clearance.pdf')
+    grok.name('clearance_slip.pdf')
     grok.require('waeup.viewStudent')
     prefix = 'form'
-    omit_fields = ('password', 'suspended', 'phone', 'adm_code', 'sex')
+    omit_fields = ('password', 'suspended', 'phone', 'adm_code')
 
     @property
@@ -635,5 +635,5 @@
         students_utils = getUtility(IStudentsUtils)
         return students_utils.renderPDF(
-            self, 'clearance.pdf',
+            self, 'clearance_slip.pdf',
             self.context.student, studentview, signatures=self._signatures())
 
@@ -1000,5 +1000,5 @@
     """
     grok.context(IStudentStudyLevel)
-    grok.name('course_registration.pdf')
+    grok.name('course_registration_slip.pdf')
     grok.require('waeup.viewStudent')
     form_fields = grok.AutoFields(IStudentStudyLevel)
@@ -1044,5 +1044,5 @@
             key=lambda value: str(value.semester) + value.code)
         return students_utils.renderPDF(
-            self, 'course_registration.pdf',
+            self, 'course_registration_slip.pdf',
             self.context.student, studentview,
             tableheader=[(Sem,'semester', 1.5),(Code,'code', 2.5),
@@ -1684,10 +1684,10 @@
     """
     grok.context(IBedTicket)
-    grok.name('bed_allocation.pdf')
+    grok.name('bed_allocation_slip.pdf')
     grok.require('waeup.handleAccommodation')
     form_fields = grok.AutoFields(IBedTicket)
     form_fields['booking_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     prefix = 'form'
-    omit_fields = ('password', 'suspended', 'phone', 'adm_code', 'sex')
+    omit_fields = ('password', 'suspended', 'phone', 'adm_code')
 
     @property
@@ -1712,5 +1712,5 @@
         students_utils = getUtility(IStudentsUtils)
         return students_utils.renderPDF(
-            self, 'bed_allocation.pdf',
+            self, 'bed_allocation_slip.pdf',
             self.context.student, studentview)
 
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9451)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9452)
@@ -646,5 +646,5 @@
         self.browser.open(self.manage_student_path)
         self.browser.getControl('Delete').click()
-        self.browser.open(self.student_path + '/clearance.pdf')
+        self.browser.open(self.student_path + '/clearance_slip.pdf')
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
         self.assertEqual(self.browser.headers['Content-Type'],
@@ -2319,5 +2319,5 @@
 
         # Students can open the pdf slip
-        self.browser.open(self.browser.url + '/bed_allocation.pdf')
+        self.browser.open(self.browser.url + '/bed_allocation_slip.pdf')
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
         self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9451)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9452)
@@ -135,5 +135,5 @@
         data_right.append([f_label,f_text])
 
-    if getattr(studentview.context, 'certcode'):
+    if getattr(studentview.context, 'certcode', None):
         f_label = formatted_label(size=12) % _('Study Course')
         f_label = Paragraph(f_label, style["Normal"])
@@ -505,8 +505,4 @@
             footer_text = "%s - %s - " % (student.student_id, footer_text)
 
-        # Insert history
-        if not filename.startswith('payment'):
-            data.extend(creator.fromStringList(student.history.messages))
-
         # Insert student data table
         portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
@@ -529,5 +525,11 @@
         data.extend(docs_as_flowables(view, portal_language))
 
-        # Insert content table (optionally on second page)
+        # Insert history
+        if filename.startswith('clearance') or filename.startswith('course'):
+            hist_translation = trans(_('Workflow History'), portal_language)
+            data.append(Paragraph(hist_translation, style["Heading3"]))
+            data.extend(creator.fromStringList(student.history.messages))
+
+       # Insert content table (optionally on second page)
         if tabledata and tableheader:
             #data.append(PageBreak())
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py	(revision 9451)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py	(revision 9452)
@@ -287,5 +287,5 @@
     icon = 'actionicon_pdf.png'
     text = _('Download clearance slip')
-    target = 'clearance.pdf'
+    target = 'clearance_slip.pdf'
 
 class ClearanceViewActionButton(ManageActionButton):
@@ -395,5 +395,5 @@
     icon = 'actionicon_pdf.png'
     text = _('Download course registration slip')
-    target = 'course_registration.pdf'
+    target = 'course_registration_slip.pdf'
 
     @property
@@ -466,5 +466,5 @@
     icon = 'actionicon_pdf.png'
     text = _('Download bed allocation slip')
-    target = 'bed_allocation.pdf'
+    target = 'bed_allocation_slip.pdf'
 
 class RelocateStudentActionButton(ManageActionButton):
