Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py	(revision 12061)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py	(revision 12062)
@@ -50,5 +50,6 @@
 from waeup.ikoba.customers.interfaces import (
     ICustomer, ICustomersContainer, ICustomerRequestPW, ICustomersUtils,
-    ICustomerDocument, ICustomerDocumentsContainer, ICustomerCreate
+    ICustomerDocument, ICustomerDocumentsContainer, ICustomerCreate,
+    ICustomerPDFDocument
     )
 from waeup.ikoba.customers.catalog import search
@@ -932,5 +933,5 @@
         return
 
-class ExportPDFDocumentsOverviewPage(UtilityView, grok.View):
+class PDFDocumentsOverviewPage(UtilityView, grok.View):
     """Deliver an overview slip.
     """
@@ -988,2 +989,36 @@
             tabledata=tabledata,
             omit_fields=self.omit_fields)
+
+
+class PDFDocumentSlipPage(UtilityView, grok.View):
+    """Deliver pdf file including metadata.
+    """
+    grok.context(ICustomerDocument)
+    grok.name('document_slip.pdf')
+    grok.require('waeup.viewCustomer')
+    prefix = 'form'
+
+    omit_fields = ('suspended', 'sex',
+                   'suspended_comment',)
+
+    #form_fields = grok.AutoFields(ICustomerPDFDocument).omit(
+    #    'last_transition_date')
+    form_fields =()
+
+    @property
+    def label(self):
+        portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE
+        return '%s of %s\nTitle: %s' % (
+            self.context.translated_class_name,
+            self.context.customer.display_fullname,
+            self.context.title)
+
+    def render(self):
+        portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE
+        customerview = CustomerBasePDFFormPage(self.context.customer,
+            self.request, self.omit_fields)
+        customers_utils = getUtility(ICustomersUtils)
+        return customers_utils.renderPDF(
+            self, 'document_slip.pdf',
+            self.context.customer, customerview,
+            omit_fields=self.omit_fields)
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/fileviewlets.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/fileviewlets.py	(revision 12061)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/fileviewlets.py	(revision 12062)
@@ -41,5 +41,5 @@
     CustomerFilesUploadPage,
     DocumentDisplayFormPage, DocumentManageFormPage, DocumentEditFormPage,
-    ExportPDFDocumentsOverviewPage)
+    PDFDocumentSlipPage,)
 
 grok.context(IIkobaObject)  # Make IIkobaObject the default context
@@ -262,5 +262,5 @@
 # File viewlets for customer documents
 
-class SampleManageUpload(FileUpload):
+class SampleScanManageUpload(FileUpload):
     """Scan upload viewlet for officers.
     """
@@ -276,5 +276,5 @@
 
 
-class SampleEditUpload(SampleManageUpload):
+class SampleScanEditUpload(SampleScanManageUpload):
     """Scan upload viewlet for customer.
     """
@@ -283,5 +283,5 @@
 
 
-class SampleDisplay(FileDisplay):
+class SampleScanDisplay(FileDisplay):
     """Scan display viewlet.
     """
@@ -303,6 +303,9 @@
     download_name = u'sample'
 
-
-class PDFManageUpload(FileUpload):
+class SampleScanPDFSlip(SampleScanDisplay):
+    grok.view(PDFDocumentSlipPage)
+
+
+class PDFScanManageUpload(FileUpload):
     """Scan upload viewlet for officers.
     """
@@ -317,5 +320,5 @@
 
 
-class PDFEditUpload(PDFManageUpload):
+class PDFScanEditUpload(PDFScanManageUpload):
     """Scan upload viewlet for customer.
     """
@@ -324,5 +327,5 @@
 
 
-class PDFDisplay(FileDisplay):
+class PDFScanDisplay(FileDisplay):
     """Scan display viewlet.
     """
@@ -343,2 +346,5 @@
     grok.require('waeup.viewCustomer')
     download_name = u'sample.pdf'
+
+class PDFScanSlip(PDFScanDisplay):
+    grok.view(PDFDocumentSlipPage)
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py	(revision 12061)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py	(revision 12062)
@@ -893,10 +893,10 @@
         # Costumer can upload a document.
         self.browser.getLink("Edit").click()
-        ctrl = self.browser.getControl(name='sampleeditupload')
+        ctrl = self.browser.getControl(name='samplescaneditupload')
         file_obj = open(SAMPLE_IMAGE, 'rb')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(file_obj, filename='my_document.jpg')
         self.browser.getControl(
-            name='upload_sampleeditupload').click()
+            name='upload_samplescaneditupload').click()
         self.assertTrue(
             'href="http://localhost/app/customers/K1000000/documents/d102/sample"'
@@ -919,5 +919,5 @@
         # Create a pseudo image file and select it to be uploaded 
         image = open(SAMPLE_IMAGE, 'rb')
-        ctrl = self.browser.getControl(name='samplemanageupload')
+        ctrl = self.browser.getControl(name='samplescanmanageupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(image, filename='my_sample_scan.jpg')
@@ -929,9 +929,9 @@
         # ... but the correct upload submit button does
         image = open(SAMPLE_IMAGE)
-        ctrl = self.browser.getControl(name='samplemanageupload')
+        ctrl = self.browser.getControl(name='samplescanmanageupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(image, filename='my_sample_scan.jpg')
         self.browser.getControl(
-            name='upload_samplemanageupload').click()
+            name='upload_samplescanmanageupload').click()
         self.assertTrue(
             'href="http://localhost/app/customers/K1000000/documents/d101/sample"'
@@ -945,40 +945,40 @@
         self.browser.open(self.customer_path + '/documents/d101/manage')
         self.assertFalse(
-            'upload_samplemanageupload' in self.browser.contents)
+            'upload_samplescanmanageupload' in self.browser.contents)
         # File must be deleted first
-        self.browser.getControl(name='delete_samplemanageupload').click()
+        self.browser.getControl(name='delete_samplescanmanageupload').click()
         self.assertTrue(
             'sample deleted' in self.browser.contents)
         # Uploading a file which is bigger than 150k will raise an error
         big_image = StringIO(open(SAMPLE_IMAGE, 'rb').read() * 75)
-        ctrl = self.browser.getControl(name='samplemanageupload')
+        ctrl = self.browser.getControl(name='samplescanmanageupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(big_image, filename='my_sample_scan.jpg')
         self.browser.getControl(
-            name='upload_samplemanageupload').click()
+            name='upload_samplescanmanageupload').click()
         self.assertTrue(
             'Uploaded file is too big' in self.browser.contents)
         # we do not rely on filename extensions given by uploaders
         image = open(SAMPLE_IMAGE, 'rb') # a jpg-file
-        ctrl = self.browser.getControl(name='samplemanageupload')
+        ctrl = self.browser.getControl(name='samplescanmanageupload')
         file_ctrl = ctrl.mech_control
         # tell uploaded file is bmp
         file_ctrl.add_file(image, filename='my_sample_scan.bmp')
         self.browser.getControl(
-            name='upload_samplemanageupload').click()
+            name='upload_samplescanmanageupload').click()
         self.assertTrue(
             # jpg file was recognized
             'File sample.jpg uploaded.' in self.browser.contents)
         # Delete file again
-        self.browser.getControl(name='delete_samplemanageupload').click()
+        self.browser.getControl(name='delete_samplescanmanageupload').click()
         self.assertTrue(
             'sample deleted' in self.browser.contents)
         # File names must meet several conditions
         bmp_image = open(SAMPLE_IMAGE_BMP, 'rb')
-        ctrl = self.browser.getControl(name='samplemanageupload')
+        ctrl = self.browser.getControl(name='samplescanmanageupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(bmp_image, filename='my_sample_scan.bmp')
         self.browser.getControl(
-            name='upload_samplemanageupload').click()
+            name='upload_samplescanmanageupload').click()
         self.assertTrue('Only the following extensions are allowed'
             in self.browser.contents)
@@ -995,24 +995,24 @@
         # Create a pseudo image file and select it to be uploaded
         image = open(SAMPLE_IMAGE, 'rb')
-        ctrl = self.browser.getControl(name='pdfmanageupload')
+        ctrl = self.browser.getControl(name='pdfscanmanageupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(image, filename='my_sample_scan.jpg')
         self.browser.getControl(
-            name='upload_pdfmanageupload').click()
+            name='upload_pdfscanmanageupload').click()
         self.assertTrue(
             'pdf file extension expected' in self.browser.contents)
-        ctrl = self.browser.getControl(name='pdfmanageupload')
+        ctrl = self.browser.getControl(name='pdfscanmanageupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(image, filename='my_sample_scan.pdf')
         self.browser.getControl(
-            name='upload_pdfmanageupload').click()
+            name='upload_pdfscanmanageupload').click()
         self.assertTrue(
             'Could not determine file type' in self.browser.contents)
         pdf = open(SAMPLE_PDF, 'rb')
-        ctrl = self.browser.getControl(name='pdfmanageupload')
+        ctrl = self.browser.getControl(name='pdfscanmanageupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(pdf, filename='my_sample_scan.pdf')
         self.browser.getControl(
-            name='upload_pdfmanageupload').click()
+            name='upload_pdfscanmanageupload').click()
         self.assertTrue(
             'href="http://localhost/app/customers/K1000000/documents/d102/sample.pdf">PDF File</a>'
@@ -1025,5 +1025,5 @@
     def test_view_slips(self):
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        # Officers can open the pdf transcript
+        # Officers can open the document overview
         self.browser.open(self.customer_path + '/documents')
         self.browser.getLink("Download documents overview").click()
@@ -1033,2 +1033,10 @@
         open(path, 'wb').write(self.browser.contents)
         print "Sample PDF overview_slip.pdf written to %s" % path
+        # Officers can open document slips
+        self.browser.open(self.customer_path + '/documents/d101')
+        self.browser.getLink("Download document slip").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
+        path = os.path.join(samples_dir(), 'document_slip.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample document_slip.pdf written to %s" % path
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/utils.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/utils.py	(revision 12061)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/utils.py	(revision 12062)
@@ -232,5 +232,5 @@
     fm.update()
     if fm.viewlets:
-        sc_translation = trans(_('Scanned Documents'), lang)
+        sc_translation = trans(_('Connected Files'), lang)
         data.append(Paragraph(sc_translation, HEADING_STYLE))
         # Insert list of scanned documents
@@ -350,7 +350,12 @@
         # Insert history
         if show_history:
-            hist_translation = trans(_('Workflow History'), portal_language)
-            data.append(Paragraph(hist_translation, HEADING_STYLE))
-            data.extend(creator.fromStringList(customer.history.messages))
+            if getattr(view.context, 'history', None):
+                hist_translation = trans(_('Document Workflow History'), portal_language)
+                data.append(Paragraph(hist_translation, HEADING_STYLE))
+                data.extend(creator.fromStringList(view.context.history.messages))
+            else:
+                hist_translation = trans(_('Customer Workflow History'), portal_language)
+                data.append(Paragraph(hist_translation, HEADING_STYLE))
+                data.extend(creator.fromStringList(customer.history.messages))
 
         # Insert content tables (optionally on second page)
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/viewlets.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/viewlets.py	(revision 12061)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/viewlets.py	(revision 12062)
@@ -298,5 +298,5 @@
 
 
-class PDFSlipActionButton(ManageActionButton):
+class PDFOverviewActionButton(ManageActionButton):
     grok.order(2)
     grok.context(ICustomerDocumentsContainer)
@@ -350,2 +350,11 @@
     target = 'index'
     icon = 'actionicon_view.png'
+
+class PDFSlipActionButton(ManageActionButton):
+    grok.order(3)
+    grok.context(ICustomerDocument)
+    grok.view(DocumentDisplayFormPage)
+    grok.require('waeup.viewCustomer')
+    icon = 'actionicon_pdf.png'
+    text = _('Download document slip')
+    target = 'document_slip.pdf'
