Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py	(revision 12258)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py	(revision 12259)
@@ -139,4 +139,5 @@
         contract = createObject('waeup.SampleContract')
         contract.title = u'My Contract'
+        contract.contract_id = u'CON1'
         contract.product_object = self.product
         contract.document_object = self.document
@@ -436,47 +437,41 @@
             dict(customer_id='ID_NONE', contract_id='nonsense'), self.app) is None
         assert self.processor.getEntry(
-            dict(customer_id=self.customer.customer_id, contract_id='c101'),
-            self.app) is self.customer['contracts']['c101']
+            dict(customer_id=self.customer.customer_id, contract_id='CON1'),
+            self.app) is self.customer['contracts']['CON1']
 
     def test_delEntry(self):
         assert self.processor.getEntry(
-            dict(customer_id=self.customer.customer_id, contract_id='c101'),
-            self.app) is self.customer['contracts']['c101']
+            dict(customer_id=self.customer.customer_id, contract_id='CON1'),
+            self.app) is self.customer['contracts']['CON1']
         self.assertEqual(len(self.customer['contracts'].keys()),1)
         self.processor.delEntry(
-            dict(customer_id=self.customer.customer_id, contract_id='c101'),
+            dict(customer_id=self.customer.customer_id, contract_id='CON1'),
             self.app)
         assert self.processor.getEntry(
-            dict(customer_id=self.customer.customer_id, contract_id='c101'),
+            dict(customer_id=self.customer.customer_id, contract_id='CON1'),
             self.app) is None
         self.assertEqual(len(self.customer['contracts'].keys()),0)
 
     def test_addEntry(self):
-        self.assertEqual(self.app._curr_con_id, 102)
         self.assertEqual(len(self.customer['contracts'].keys()),1)
         contract1 = createObject(u'waeup.SampleContract')
-        contract1.contract_id = 'c234'
+        contract1.contract_id = u'CON2'
         self.processor.addEntry(
-            contract1, dict(customer_id=self.customer.customer_id, contract_id='c234'),
+            contract1, dict(customer_id=self.customer.customer_id, contract_id='CON2'),
             self.app)
         self.assertEqual(len(self.customer['contracts'].keys()),2)
-        self.assertEqual(self.customer['contracts']['c234'].contract_id, 'c234')
-        # _curr_con_id hasn't changed
-        self.assertEqual(self.app._curr_con_id, 102)
+        self.assertEqual(self.customer['contracts']['CON2'].contract_id, 'CON2')
 
     def test_checkConversion(self):
-        self.assertEqual(self.app._curr_con_id, 102)
-        errs, inv_errs, conv_dict = self.processor.checkConversion(
-            dict(contract_id='c126', class_name='SampleContract',
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(contract_id='CON3', class_name='SampleContract',
                  document_object='DOC1', product_object='SAM'))
         self.assertEqual(len(errs),0)
-        errs, inv_errs, conv_dict = self.processor.checkConversion(
-            dict(contract_id='nonsense', class_name='SampleContract'))
+        #errs, inv_errs, conv_dict = self.processor.checkConversion(
+        #    dict(contract_id='id with spaces', class_name='SampleContract'))
+        #self.assertEqual(len(errs),1)
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(contract_id='CON3', class_name='WrongContract'))
         self.assertEqual(len(errs),1)
-        errs, inv_errs, conv_dict = self.processor.checkConversion(
-            dict(contract_id='c127', class_name='WrongContract'))
-        self.assertEqual(len(errs),1)
-        # _curr_con_id hasn't changed
-        self.assertEqual(self.app._curr_con_id, 102)
 
     def test_import(self):
@@ -487,12 +482,9 @@
         fail_file = open(fail_file).read()
         self.assertEqual(fail_file,
-            'reg_number,contract_id,title,class_name,product_object,'
-            'document_object,--ERRORS--\r\n'
-            '2,c5,My stolen contract,SampleContract,SAM,DOC1,'
-            'contract_id: id exists\r\n'
-            '3,c6,My 5th contract,SampleContract,SAM,NONEXISTENT,'
-            'document_object: Invalid value\r\n'
-            '3,c7,My sixt contract,SampleContract,NONEXISTENT,DOC1,'
-            'product_object: Invalid value\r\n')
+            'reg_number,contract_id,title,class_name,product_object,document_object,--ERRORS--\r\n'
+            '2,c5,My stolen contract,SampleContract,SAM,DOC1,This object already exists. Skipping.\r\n'
+            '3,c6,My 5th contract,SampleContract,SAM,NONEXISTENT,document_object: Invalid value\r\n'
+            '3,c7,My sixt contract,SampleContract,NONEXISTENT,DOC1,product_object: Invalid value\r\n'
+            )
         contract = self.processor.getEntry(dict(reg_number='1',
             contract_id='c3'), self.app)
@@ -506,8 +498,11 @@
         logcontent = open(self.logfile).read()
         # Logging message from updateEntry
+        # Fetch uuid
+        conid = [i for i in self.app['customers']['X666666']['contracts'].keys()
+            if len(i) > 10][0]
         self.assertTrue(
-            'INFO - system - Contract Processor - '
-            'sample_contract_data - X666666 - updated: '
-            'contract_id=c3, title=My first contract'
+            'INFO - system - Contract Processor - sample_contract_data - '
+            'X666666 - %s - updated: title=My 4th contract, '
+            'product_object=SAM, document_object=DOC1' % conid
             in logcontent)
 
@@ -521,7 +516,7 @@
         num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file, CONTRACT_HEADER_FIELDS,'update')
-        # There are one record without contract_id, one duplicate and two
+        # There are one record without contract_id and two
         # records with wrong object identifier.
-        self.assertEqual(num_warns,4)
+        self.assertEqual(num_warns,3)
         shutil.rmtree(os.path.dirname(fin_file))
 
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 12258)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py	(revision 12259)
@@ -124,4 +124,5 @@
         self.contract = createObject('waeup.SampleContract')
         self.contract.title = u'My first contract'
+        self.contract.contract_id = u'CON1'
         self.customer['contracts'].addContract(self.contract)
 
@@ -1161,8 +1162,9 @@
         self.browser.getControl("Add contract").click()
         self.assertTrue('Sample Contract added.' in self.browser.contents)
-        contract = self.customer['contracts']['c102']
+        conid = [i for i in self.customer['contracts'].keys() if len(i) > 10][0]
+        contract = self.customer['contracts'][conid]
 
         # Contract can be edited
-        self.browser.getLink("c102").click()
+        self.browser.getLink(conid).click()
         self.browser.getLink("Manage").click()
         self.browser.getControl(name="form.product_object").value = ['SAM']
@@ -1171,5 +1173,5 @@
         self.assertTrue('Form has been saved.' in self.browser.contents)
         self.browser.getLink("View").click()
-        self.assertEqual(self.browser.url, self.contracts_path + '/c102/index')
+        self.assertEqual(self.browser.url, self.contracts_path + '/%s/index' % conid)
 
         # Transitions can be performed
@@ -1194,5 +1196,5 @@
         logcontent = open(logfile).read()
         self.assertTrue(
-            'INFO - zope.mgr - K1000000 - c102 - Contract created'
+            'INFO - zope.mgr - K1000000 - %s - Contract created' % conid
             in logcontent)
         self.assertTrue(
@@ -1202,15 +1204,15 @@
         self.assertTrue(
             'INFO - zope.mgr - customers.browser.ContractManageFormPage '
-            '- K1000000 - c102 - saved: title'
+            '- K1000000 - %s - saved: title' % conid
             in logcontent)
         self.assertTrue(
-            'INFO - zope.mgr - K1000000 - c102 - Submitted for approval'
+            'INFO - zope.mgr - K1000000 - %s - Submitted for approval' % conid
             in logcontent)
         self.assertTrue(
-            'INFO - zope.mgr - K1000000 - c102 - Approved'
+            'INFO - zope.mgr - K1000000 - %s - Approved' % conid
             in logcontent)
         self.assertTrue(
             'INFO - zope.mgr - customers.browser.ContractsManageFormPage '
-            '- K1000000 - removed: c102'
+            '- K1000000 - removed: %s' % conid
             in logcontent)
 
@@ -1235,12 +1237,13 @@
         self.browser.getControl("Add contract").click()
         self.assertTrue('Sample Contract added.' in self.browser.contents)
-        contract = self.customer['contracts']['c102']
+        conid = [i for i in self.customer['contracts'].keys() if len(i) > 10][0]
+        contract = self.customer['contracts'][conid]
         # Contract can be edited ...
-        self.browser.open(self.contracts_path + '/c102/edit')
+        self.browser.open(self.contracts_path + '/%s/edit' % conid)
         #self.browser.getLink("Edit").click()
         self.assertTrue('The requested form is locked' in self.browser.contents)
         # Customer is in wrong state
         IWorkflowState(self.customer).setState(APPROVED)
-        self.browser.open(self.contracts_path + '/c102/edit')
+        self.browser.open(self.contracts_path + '/%s/edit' % conid)
         self.browser.getControl(name="form.title").value = 'My second contract'
         # SAM is in the correct contract_category ...
@@ -1249,5 +1252,5 @@
         self.assertFalse('<option value="LIC">' in self.browser.contents)
         # So far last_product_id is None.
-        self.assertTrue(self.customer['contracts']['c102'].last_product_id is None)
+        self.assertTrue(self.customer['contracts'][conid].last_product_id is None)
         self.browser.getControl(name="form.product_object").value = ['SAM']
         self.browser.getControl("Save").click()
@@ -1258,5 +1261,5 @@
         self.assertFalse('My first document' in self.browser.contents)
         IWorkflowState(self.document).setState(SUBMITTED)
-        self.browser.open(self.contracts_path + '/c102/edit')
+        self.browser.open(self.contracts_path + '/%s/edit' % conid)
         self.browser.getControl(name="form.product_object").value = ['SAM']
         self.browser.getControl(name="form.document_object").value = ['DOC1']
@@ -1265,5 +1268,5 @@
         # After saving the form, last_product_id and other attributes are set
         self.assertTrue('Form has been saved.' in self.browser.contents)
-        self.assertEqual(self.customer['contracts']['c102'].last_product_id, 'SAM')
+        self.assertEqual(self.customer['contracts'][conid].last_product_id, 'SAM')
         self.assertEqual(contract.title, 'My second contract')
         self.assertEqual(contract.product_object, self.product)
@@ -1272,8 +1275,8 @@
         self.browser.getControl(name="form.title").value = 'My third contract'
         self.browser.getControl("Save").click()
-        self.assertEqual(self.customer['contracts']['c102'].last_product_id, 'SAM')
+        self.assertEqual(self.customer['contracts'][conid].last_product_id, 'SAM')
         self.assertTrue('Form has been saved.' in self.browser.contents)
         self.browser.getLink("View").click()
-        self.assertEqual(self.browser.url, self.contracts_path + '/c102/index')
+        self.assertEqual(self.browser.url, self.contracts_path + '/%s/index' % conid)
         # An href attribute is referring to the document and product objects
         self.assertTrue('<a href="http://localhost/app/products/SAM">SAM -'
@@ -1290,5 +1293,5 @@
         self.assertTrue('Contract State: submitted for approval' in self.browser.contents)
         # Customer can't edit the contract once it has been submitted
-        self.browser.open(self.contracts_path + '/c102/edit')
+        self.browser.open(self.contracts_path + '/%s/edit' % conid)
         self.assertTrue('The requested form is locked' in self.browser.contents)
 
@@ -1308,5 +1311,5 @@
         self.contract.document_object = self.document
         self.contract.product_object = self.product
-        self.browser.open(self.customer_path + '/contracts/c101')
+        self.browser.open(self.customer_path + '/contracts/CON1')
         self.browser.getLink("Download contract slip").click()
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
@@ -1338,5 +1341,5 @@
         IWorkflowState(self.contract).setState('submitted')
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open(self.contracts_path + '/c101/trigtrans')
+        self.browser.open(self.contracts_path + '/CON1/trigtrans')
         self.browser.getControl(name="transition").value = ['approve']
         self.browser.getControl("Apply now").click()
@@ -1345,5 +1348,5 @@
             '<div class="alert alert-warning">Attached documents must be verified first.</div>'
             in self.browser.contents)
-        self.browser.open(self.contracts_path + '/c101/trigtrans')
+        self.browser.open(self.contracts_path + '/CON1/trigtrans')
         IWorkflowState(self.document).setState('verified')
         self.browser.getControl(name="transition").value = ['approve']
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_catalog.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_catalog.py	(revision 12258)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_catalog.py	(revision 12259)
@@ -77,4 +77,5 @@
         contract = createObject('waeup.SampleContract')
         contract.title = u'My Samle Contract'
+        contract.contract_id = u'CON1'
         contract.product_object = product
         contract.document_object = document
@@ -195,5 +196,5 @@
         logcontent = open(logfile).read()
         self.assertTrue(
-            'INFO - system - ObjectRemovedEvent - K1000000 - c101 - removed: SAM\n'
+            'INFO - system - ObjectRemovedEvent - K1000000 - CON1 - removed: SAM\n'
             in logcontent)
 
@@ -213,5 +214,5 @@
         logcontent = open(logfile).read()
         self.assertTrue(
-            'INFO - system - ObjectRemovedEvent - K1000000 - c101 - removed: %s\n'
+            'INFO - system - ObjectRemovedEvent - K1000000 - CON1 - removed: %s\n'
             % self.document_id in logcontent)
 
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_contract.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_contract.py	(revision 12258)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_contract.py	(revision 12259)
@@ -62,5 +62,4 @@
         self.assertRaises(TypeError, container.addContract, object())
         self.assertEqual(contract.class_name, 'SampleContract')
-        self.assertEqual(id, 'c999')
         return
 
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_export.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_export.py	(revision 12258)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_export.py	(revision 12259)
@@ -249,4 +249,5 @@
         # we can export a nearly empty contract
         contract = SampleContract()
+        contract.contract_id = u'CON1'
         exporter = ContractExporter()
         exporter.export([contract], self.outfile)
@@ -258,5 +259,5 @@
             'product_object,state,title\r\n'
 
-            'SampleContract,sample,c101,,[],,,,\r\n'
+            'SampleContract,sample,CON1,,[],,,,\r\n'
             )
         return
@@ -274,5 +275,5 @@
             'product_object,state,title\r\n'
 
-            'SampleContract,sample,c101,DOC1,[u\'2014-12-04 12:10:46 UTC - '
+            'SampleContract,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - '
             'Contract created by system\'],,'
             'SAM,created,My Contract\r\n',
@@ -293,5 +294,5 @@
             'product_object,state,title\r\n'
 
-            'SampleContract,sample,c101,DOC1,[u\'2014-12-04 12:10:46 UTC - '
+            'SampleContract,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - '
             'Contract created by system\'],,'
             'SAM,created,My Contract\r\n',
@@ -312,5 +313,5 @@
             'product_object,state,title\r\n'
 
-            'SampleContract,sample,c101,DOC1,[u\'2014-12-04 12:10:46 UTC - '
+            'SampleContract,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - '
             'Contract created by system\'],,'
             'SAM,created,My Contract\r\n',
