- Timestamp:
- 31 Dec 2014, 13:38:50 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/contracts.py
r12346 r12352 149 149 @property 150 150 def is_approvable(self): 151 if self.customer and not self.customer.state in getUtility( 152 ICustomersUtils).CONMANAGE_CUSTOMER_STATES: 153 return False, _("Customer has not yet been approved.") 151 154 for key, field in getFields(self.check_docs_interface).items(): 152 155 if key.endswith('_object'): -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/documents.py
r12256 r12352 166 166 @property 167 167 def is_verifiable(self): 168 if self.customer and not self.customer.state in getUtility( 169 ICustomersUtils).CONMANAGE_CUSTOMER_STATES: 170 return False, _("Customer has not yet been approved.") 168 171 files = self.connected_files 169 172 if files is not None and len(files) != len(self.filenames): -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12351 r12352 837 837 # Managers can access the pages of customer documentsconter 838 838 # and can perform actions 839 IWorkflowState(self.customer).setState('approved') 839 840 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 840 841 self.browser.open(self.customer_path) … … 1041 1042 1042 1043 def test_verify_document(self): 1044 IWorkflowState(self.customer).setState('approved') 1043 1045 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1044 1046 self.browser.open(self.customer_path + '/documents/DOC1/manage') … … 1347 1349 1348 1350 def test_contract_approval(self): 1349 # This is not a UI test. It just a functional test.1351 # This is not a UI test. It's just a functional test. 1350 1352 self.assertRaises(ConstraintNotSatisfied, 1351 1353 self.contract.document_object, self.document) … … 1356 1358 self.assertRaises(InvalidTransitionError, 1357 1359 IWorkflowInfo(self.contract).fireTransition, 'approve') 1358 # Document must be verified for the approval of contracts 1360 # Customer must be approved and 1361 # document must be verified for the approval of contracts 1359 1362 IWorkflowState(self.document).setState('verified') 1363 IWorkflowState(self.customer).setState('approved') 1360 1364 IWorkflowInfo(self.contract).fireTransition('approve') 1361 1365 self.assertEqual(IWorkflowState(self.contract).getState(), 'approved') 1362 1366 1363 1367 def test_contract_approval_in_UI(self): 1364 # Now let's see what the UI says wh ytrying to approve a contract1368 # Now let's see what the UI says when trying to approve a contract 1365 1369 # with unverified documents. 1370 IWorkflowState(self.customer).setState('approved') 1366 1371 IWorkflowState(self.document).setState('submitted') 1367 1372 self.contract.document_object = self.document
Note: See TracChangeset for help on using the changeset viewer.