Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/documents.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/documents.py	(revision 12161)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/documents.py	(revision 12162)
@@ -126,8 +126,10 @@
         """Set md5 checksum attribute for all files connected to this document.
         """
-        for file in self.connected_files:
-            attrname = '%s_md5' % file[0]
-            checksum = md5(file[1].read()).hexdigest()
-            setattr(self, attrname, checksum)
+        connected_files = self.connected_files
+        if connected_files:
+            for file in self.connected_files:
+                attrname = '%s_md5' % file[0]
+                checksum = md5(file[1].read()).hexdigest()
+                setattr(self, attrname, checksum)
         return
 
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 12161)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py	(revision 12162)
@@ -975,9 +975,9 @@
         self.assertTrue(
             'Uploaded file is too big' in self.browser.contents)
-        # we do not rely on filename extensions given by uploaders
+        # We do not rely on filename extensions given by uploaders
         image = open(SAMPLE_IMAGE, 'rb') # a jpg-file
         ctrl = self.browser.getControl(name='samplescanmanageupload')
         file_ctrl = ctrl.mech_control
-        # tell uploaded file is bmp
+        # Tell uploaded file is bmp
         file_ctrl.add_file(image, filename='my_sample_scan.bmp')
         self.browser.getControl(
@@ -999,4 +999,24 @@
         self.assertTrue('Only the following extensions are allowed'
             in self.browser.contents)
+
+    def test_verify_document(self):
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.open(self.customer_path + '/documents/d101/manage')
+        image = open(SAMPLE_IMAGE, 'rb')
+        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_samplescanmanageupload').click()
+        IWorkflowState(self.document).setState(SUBMITTED)
+        # Only after verifying the document, sample_md5 is set
+        self.assertEqual(
+            getattr(self.document, 'sample_md5', None), None)
+        self.browser.open(self.documents_path + '/d101/trigtrans')
+        self.browser.getControl(name="transition").value = ['verify']
+        self.browser.getControl("Save").click()
+        self.assertEqual(
+            getattr(self.document, 'sample_md5', None),
+                    '1d1ab893e87c240afb2104d61ddfe180')
 
     def test_manage_upload_pdf_file(self):
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/documents/workflow.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/documents/workflow.py	(revision 12161)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/documents/workflow.py	(revision 12162)
@@ -129,4 +129,6 @@
     last_transition_date when transition happened.
     """
+    if event.transition.transition_id == 'verify':
+        obj.setMD5()
     msg = event.transition.user_data['msg']
     history = IObjectHistory(obj)
