Index: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py	(revision 12336)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py	(revision 12337)
@@ -88,4 +88,7 @@
     view.redirect(view.url(view.context))
     return
+
+def isCustomer(principal):
+    return getattr(principal, 'user_type', None) == 'customer'
 
 
@@ -1093,8 +1096,8 @@
 
 
-class ContractsManageFormPage(IkobaEditFormPage):
-    """ Page to manage the customer contracts
-
-    This manage form page is for both customers and officers.
+class ContractsFormPage(IkobaEditFormPage):
+    """ Page to display, edit or manage customer contracts
+
+    This form page is for both customers and officers.
     """
     grok.context(IContractsContainer)
@@ -1106,15 +1109,20 @@
 
     @property
-    def manage_contracts_allowed(self):
+    def edit_contracts_allowed(self):
+        right_customer_state = self.context.customer.state in getUtility(
+            ICustomersUtils).CONMANAGE_CUSTOMER_STATES
+        if isCustomer(self.request.principal) and not right_customer_state:
+            return False
         return checkPermission('waeup.editContracts', self.context)
 
-    def unremovable(self, contract):
-        usertype = getattr(self.request.principal, 'user_type', None)
-        if not usertype:
-            return False
-        if not self.manage_contracts_allowed:
-            return True
-        return (self.request.principal.user_type == 'customer' and \
-            contract.state in (APPROVED, REJECTED, EXPIRED))
+    def remove_contract_allowed(self, contract):
+        if isCustomer(self.request.principal):
+            right_customer_state = self.context.customer.state in getUtility(
+                ICustomersUtils).CONMANAGE_CUSTOMER_STATES
+            if not right_customer_state:
+                return False
+            if contract.state in (APPROVED, REJECTED, EXPIRED):
+                return False
+        return checkPermission('waeup.editContracts', self.context)
 
     @property
@@ -1143,5 +1151,5 @@
             # Customers are not allowed to remove used contracts
             contract = self.context.get(id, None)
-            if contract is not None and not self.unremovable(contract):
+            if contract is not None and self.remove_contract_allowed(contract):
                 del self.context[id]
                 deleted.append(id)
@@ -1155,10 +1163,12 @@
 
 
-class ContractAddFormPage(IkobaAddFormPage):
+class ContractAddPage(IkobaAddFormPage):
     """ Page to add an contract
+
+    This page is for both customers and officers.
     """
     grok.context(IContractsContainer)
     grok.name('addcontract')
-    grok.template('contractaddform')
+    grok.template('contractaddpage')
     grok.require('waeup.editContracts')
     label = _('Add contract')
@@ -1167,4 +1177,18 @@
     form_fields = grok.AutoFields(IContract).omit(
         'product_object', 'contract_id', 'product_options')
+
+    @property
+    def edit_contracts_allowed(self):
+        right_customer_state = self.context.customer.state in getUtility(
+            ICustomersUtils).CONMANAGE_CUSTOMER_STATES
+        if isCustomer(self.request.principal) and not right_customer_state:
+            return False
+        return True
+
+    def update(self):
+        if not self.edit_contracts_allowed:
+            emit_lock_message(self)
+            return
+        return super(ContractAddPage, self).update()
 
     @property
@@ -1187,5 +1211,5 @@
         self.context.writeLogMessage(
             self,'added: %s %s' % (contype, contract.contract_id))
-        self.redirect(self.url(self.context))
+        self.redirect(self.url(contract, 'selectproduct'))
         return
 
@@ -1193,4 +1217,35 @@
     def cancel(self, **data):
         self.redirect(self.url(self.context))
+
+
+class ContractSelectProductPage(IkobaAddFormPage):
+    """ Page to select a contract product
+
+    This page is for both customers and officers.
+    """
+    grok.context(IContract)
+    grok.name('selectproduct')
+    grok.require('waeup.editContracts')
+    label = _('Select product')
+    pnav = 4
+
+    form_fields = grok.AutoFields(IContract).select('product_object')
+
+    def update(self):
+        if not self.context.is_editable and self.context.product_options == []:
+            emit_lock_message(self)
+            return
+        return super(ContractSelectProductPage, self).update()
+
+    @action(_('Save and proceed'), style='primary')
+    def save(self, **data):
+        msave(self, **data)
+        isCustomer = getattr(
+            self.request.principal, 'user_type', None) == 'customer'
+        if isCustomer:
+            self.redirect(self.url(self.context, 'edit'))
+        else:
+            self.redirect(self.url(self.context, 'manage'))
+        return
 
 
@@ -1227,4 +1282,10 @@
     deletion_warning = _('Are you sure?')
 
+    def update(self):
+        if not self.context.is_editable:
+            emit_lock_message(self)
+            return
+        return super(ContractManageFormPage, self).update()
+
     @property
     def form_fields(self):
@@ -1243,5 +1304,5 @@
 
 class ContractEditFormPage(ContractManageFormPage):
-    """ Page to edit a contract
+    """ Page to edit a contract by customer only
     """
     grok.name('edit')
@@ -1251,11 +1312,5 @@
     def form_fields(self):
         return grok.AutoFields(self.context.edit_form_fields_interface).omit(
-            'contract_id')
-
-    def update(self):
-        if not self.context.is_editable_by_customer:
-            emit_lock_message(self)
-            return
-        return super(ContractEditFormPage, self).update()
+            'contract_id', 'product_object')
 
     @action(_('Save'), style='primary')
@@ -1342,5 +1397,5 @@
     def render(self):
         portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE
-        Id = translate(_('Id'), 'waeup.ikoba', target_language=portal_language)
+        #Id = translate(_('Id'), 'waeup.ikoba', target_language=portal_language)
         Title = translate(_('Title'), 'waeup.ikoba', target_language=portal_language)
         Type = translate(_('Type'), 'waeup.ikoba', target_language=portal_language)
@@ -1353,5 +1408,6 @@
             tabledata.append(sorted(
                 [value for value in self.context.values()]))
-            tableheader.append([(Id, 'contract_id', 2),
+            tableheader.append([
+                             #(Id, 'contract_id', 2),
                              (Title, 'title', 6),
                              (Type, 'translated_class_name', 6),
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractaddform.pt
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractaddform.pt	(revision 12336)
+++ 	(revision )
@@ -1,27 +1,0 @@
-<form action="." tal:attributes="action request/URL" method="post"
-      enctype="multipart/form-data" i18n:domain="waeup.ikoba">
-  <table class="form-table">
-    <tbody>
-      <tr>
-        <td class="fieldname">
-          <span i18n:translate="">Contract Type</span>:
-        </td>
-        <td>
-          <select id="contype" name="contype" size="1"
-                  class="form-control half">
-            <option tal:repeat="item view/selectable_contypes"
-                    tal:attributes="value python:item[0]">
-              <span tal:replace="python:item[1]">CONTYPE</span>
-            </option>
-          </select>
-        </td>
-      </tr>
-      <tal:widgets content="structure provider:widgets" />
-    </tbody>
-  </table>
-  <div tal:condition="view/availableActions">
-    <input tal:repeat="action view/actions"
-           tal:replace="structure action/render"
-           />
-  </div>
-</form>
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractaddpage.pt
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractaddpage.pt	(revision 12337)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractaddpage.pt	(revision 12337)
@@ -0,0 +1,27 @@
+<form action="." tal:attributes="action request/URL" method="post"
+      enctype="multipart/form-data" i18n:domain="waeup.ikoba">
+  <table class="form-table">
+    <tbody>
+      <tr>
+        <td class="fieldname">
+          <span i18n:translate="">Contract Type</span>:
+        </td>
+        <td>
+          <select id="contype" name="contype" size="1"
+                  class="form-control half">
+            <option tal:repeat="item view/selectable_contypes"
+                    tal:attributes="value python:item[0]">
+              <span tal:replace="python:item[1]">CONTYPE</span>
+            </option>
+          </select>
+        </td>
+      </tr>
+      <tal:widgets content="structure provider:widgets" />
+    </tbody>
+  </table>
+  <div tal:condition="view/availableActions">
+    <input tal:repeat="action view/actions"
+           tal:replace="structure action/render"
+           />
+  </div>
+</form>
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractsmanagepage.pt
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractsmanagepage.pt	(revision 12336)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractsmanagepage.pt	(revision 12337)
@@ -5,5 +5,5 @@
     <thead>
     <tr>
-      <th>&nbsp;</th>
+      <th tal:condition="view/edit_contracts_allowed">&nbsp;</th>
       <th i18n:translate="">Id</th>
       <th i18n:translate="">Title</th>
@@ -14,26 +14,26 @@
     </thead>
     <tbody>
-      <tr tal:repeat="cl context/values">
-         <td>
+      <tr tal:repeat="contract context/values">
+         <td tal:condition="view/edit_contracts_allowed">
           <input type="checkbox"
-    		 name="val_id"
-    		 tal:attributes="value cl/__name__"
-         tal:condition="python: not view.unremovable(cl)" />
+      		 name="val_id"
+      		 tal:attributes="value contract/__name__"
+           tal:condition="python: view.remove_contract_allowed(contract)" />
         </td>
         <td>
-          <a tal:attributes="href python: view.url(cl)">
-          <span tal:content="cl/contract_id">CONID</span></a>
+          <a tal:attributes="href python: view.url(contract)">
+          <span tal:content="contract/contract_id">CONID</span></a>
         </td>
         <td>
-          <span tal:content="cl/title">TITLE</span>
+          <span tal:content="contract/title">TITLE</span>
         </td>
         <td>
-          <span tal:content="cl/translated_class_name">CLASSNAME</span>
+          <span tal:content="contract/translated_class_name">CLASSNAME</span>
         </td>
         <td>
-          <span tal:content="cl/translated_state">STATE</span>
+          <span tal:content="contract/translated_state">STATE</span>
         </td>
         <td>
-          <span tal:content="cl/formatted_transition_date">
+          <span tal:content="contract/formatted_transition_date">
               LASTTRANSITIONDATE
           </span>
@@ -43,5 +43,5 @@
   </table>
 
-  <div tal:condition="python: view.availableActions and view.manage_contracts_allowed">
+  <div tal:condition="python: view.availableActions and view.edit_contracts_allowed">
     <span tal:repeat="action view/actions"
           tal:omit-tag="">
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/contracts.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/contracts.py	(revision 12336)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/customers/contracts.py	(revision 12337)
@@ -132,5 +132,5 @@
 
     @property
-    def is_editable_by_customer(self):
+    def is_editable(self):
         try:
             # Customer must be approved
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/export.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/export.py	(revision 12336)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/customers/export.py	(revision 12337)
@@ -214,5 +214,5 @@
                       'formatted_transition_date',
                       'translated_class_name',
-                      'is_editable_by_customer',
+                      'is_editable',
                       'is_approvable'])))
 
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/interfaces.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/interfaces.py	(revision 12336)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/customers/interfaces.py	(revision 12337)
@@ -290,5 +290,5 @@
     last_product_id = Attribute(
         'Id of product recently stored with the contract')
-    is_editable_by_customer = Attribute('Contract editable by customer')
+    is_editable = Attribute('Contract editable by customer and manager')
     is_approvable = Attribute('Contract approvable by officer')
     translated_class_name = Attribute('Translatable class name')
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/viewlets.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/viewlets.py	(revision 12336)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/customers/viewlets.py	(revision 12337)
@@ -33,5 +33,5 @@
     CustomerBaseDisplayFormPage,
     DocumentsManageFormPage, DocumentDisplayFormPage, DocumentManageFormPage,
-    ContractsManageFormPage, ContractDisplayFormPage,
+    ContractsFormPage, ContractDisplayFormPage,
     ContractManageFormPage)
 
@@ -375,5 +375,5 @@
     grok.order(2)
     grok.context(IContractsContainer)
-    grok.view(ContractsManageFormPage)
+    grok.view(ContractsFormPage)
     grok.require('waeup.viewCustomer')
     icon = 'actionicon_pdf.png'
@@ -401,5 +401,5 @@
     @property
     def target_url(self):
-        if not self.context.is_editable_by_customer:
+        if not self.context.is_editable:
             return ''
         return self.view.url(self.view.context, self.target)
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/products/interfaces.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/products/interfaces.py	(revision 12336)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/products/interfaces.py	(revision 12337)
@@ -58,6 +58,6 @@
 
     contract_title = schema.TextLine(
-        title = _(u'Product Title'),
-        description = _('Product title if empty'),
+        title = _(u'Contract Title'),
+        description = _('Product title is used if empty.'),
         required = False,
         )
