Changeset 12580
- Timestamp:
- 10 Feb 2015, 13:22:23 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py
r12535 r12580 1337 1337 def save(self, **data): 1338 1338 msave(self, **data) 1339 self.context.title = self.context.product_object.contract_autotitle 1339 1340 self.context.tc_dict = self.context.product_object.tc_dict 1340 1341 isCustomer = getattr( -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/contracts.py
r12573 r12580 75 75 self.last_product_id = None 76 76 self.tc_dict = {} 77 self.title = None 77 78 return 78 79 … … 105 106 except IndexError: 106 107 return 107 108 @property109 def title(self):110 return getattr(111 getattr(self, 'product_object', None),112 'contract_autotitle', None)113 108 114 109 @property -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/sample_contract_data.csv
r12366 r12580 1 class_name,contract_id,reg_number,product_object,document_object,product_options,tc_dict 2 SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', 'USD')]",{'en':'Hello World'} 3 SampleContract,c4,2,SAM,DOC1,[],{} 4 SampleContract,c5,3,SAM,DOC1,[],{} 5 SampleContract,,1,SAM,DOC1,[],{} 6 SampleContract,c5,2,SAM,DOC1,[],{} 7 SampleContract,c6,3,SAM,NONEXISTENT,[],{} 8 SampleContract,c7,3,NONEXISTENT,DOC1,[],{} 1 class_name,contract_id,reg_number,product_object,document_object,product_options,tc_dict,title 2 SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', 'USD')]",{'en':'Hello World'},Nice Contract 3 SampleContract,c4,2,SAM,DOC1,[],{}, 4 SampleContract,c5,3,SAM,DOC1,[],{}, 5 SampleContract,,1,SAM,DOC1,[],{}, 6 SampleContract,c5,2,SAM,DOC1,[],{}, 7 SampleContract,c6,3,SAM,NONEXISTENT,[],{}, 8 SampleContract,c7,3,NONEXISTENT,DOC1,[],{}, -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py
r12537 r12580 498 498 fail_file = open(fail_file).read() 499 499 self.assertEqual(fail_file, 500 'reg_number,contract_id, class_name,product_object,tc_dict,document_object,product_options,--ERRORS--\r\n'501 '2,c5, SampleContract,SAM,{},DOC1,[],This object already exists. Skipping.\r\n'502 '3,c6, SampleContract,SAM,{},NONEXISTENT,[],document_object: Invalid value\r\n'503 '3,c7, SampleContract,NONEXISTENT,{},DOC1,[],product_object: Invalid value\r\n'500 'reg_number,contract_id,title,class_name,product_object,tc_dict,document_object,product_options,--ERRORS--\r\n' 501 '2,c5,,SampleContract,SAM,{},DOC1,[],This object already exists. Skipping.\r\n' 502 '3,c6,,SampleContract,SAM,{},NONEXISTENT,[],document_object: Invalid value\r\n' 503 '3,c7,,SampleContract,NONEXISTENT,{},DOC1,[],product_object: Invalid value\r\n' 504 504 ) 505 505 contract = self.processor.getEntry(dict(reg_number='1', … … 523 523 self.assertTrue( 524 524 'INFO - system - Customer Sample Contract Processor - sample_contract_data - ' 525 'X666666 - %s - updated: product_object=SAM, tc_dict={}, document_object=DOC1, '525 'X666666 - %s - updated: title=, product_object=SAM, tc_dict={}, document_object=DOC1, ' 526 526 'product_options=[]' % conid 527 527 in logcontent) -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12553 r12580 1440 1440 self.contract.product_object = self.product 1441 1441 self.contract.tc_dict = {'en': u'<strong>Hello world</strong>'} 1442 self.contract.title = u'Contract Title' 1442 1443 self.browser.open(self.customer_path + '/contracts/CON1') 1443 1444 self.browser.getLink("Download contract slip").click() -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_export.py
r12500 r12580 278 278 'Contract created by system\'],,' 279 279 'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",' 280 'created,{\'en\': u\'Hello world\'}, Our Sample Product,A111111\r\n',280 'created,{\'en\': u\'Hello world\'},,A111111\r\n', 281 281 result 282 282 ) … … 298 298 'Contract created by system\'],,' 299 299 'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",' 300 'created,{\'en\': u\'Hello world\'}, Our Sample Product,A111111\r\n',300 'created,{\'en\': u\'Hello world\'},,A111111\r\n', 301 301 result 302 302 ) … … 318 318 'Contract created by system\'],,' 319 319 'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",' 320 'created,{\'en\': u\'Hello world\'}, Our Sample Product,A111111\r\n',321 result 322 ) 323 return 324 320 'created,{\'en\': u\'Hello world\'},,A111111\r\n', 321 result 322 ) 323 return 324
Note: See TracChangeset for help on using the changeset viewer.