Changeset 12488 for main/ikobacustom.pcn
- Timestamp:
- 18 Jan 2015, 16:06:01 (10 years ago)
- Location:
- main/ikobacustom.pcn/trunk/src/ikobacustom/pcn
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/contracts.py
r12484 r12488 41 41 ICustomerNavigation) 42 42 43 contract_category = ' license'43 contract_category = 'ron' 44 44 45 45 form_fields_interface = IRONContract -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py
r12485 r12488 144 144 """ 145 145 146 product_object = schema.Choice(147 title = _(u'Product'),148 source = ConCatProductSource(),149 required = True,150 )151 152 146 #document_object = schema.Choice( 153 147 # title = _(u'Document'), -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_browser.py
r12484 r12488 51 51 52 52 def setup_customizable_params(self): 53 self._contract_category = u' license'53 self._contract_category = u'ron' 54 54 return 55 55 … … 214 214 result = open(self.outfile, 'rb').read() 215 215 self.assertMatches(result, 216 'class_name,contract_category,contract_id,document_object,' 217 'history,last_product_id,product_object,product_options,' 218 'state,tc_dict,title,user_id\r\n' 219 'RONContract,license,%s,,' 220 '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']' 221 ',,,[],created,{\'en\': u\'Hello World\'},,K1000000\r\n' 216 'category_practice,class_name,contract_category,contract_id,' 217 'date_of_birth,history,last_product_id,lga,product_object,' 218 'product_options,res_address,state,state_of_origin,superintendent,' 219 'tc_dict,title,user_id,work_address,work_email,work_phone,' 220 'year_qualification\r\n' 221 ',RONContract,ron,%s,,' 222 '[u\'2015-01-18 16:40:01 WAT - Contract created by system\'],,,,' 223 '[],,created,,,{\'en\': u\'Hello World\'},,K1000000,,,,\r\n' 222 224 % self.contract.contract_id) 223 # We can reimport the file if we change the header (user_id -> customer_id) 225 # We can reimport the file if we change the header 226 # (user_id -> customer_id). Not all columns are necessary. 224 227 processor = RONContractProcessor() 225 228 open(self.outfile, 'wb').write( … … 268 271 269 272 def setup_customizable_params(self): 270 self._contract_category = u' license'273 self._contract_category = u'ron' 271 274 self._document_factory = 'waeup.PCNCustomerPDFDocument' 272 275 self._contract_factory = 'waeup.RONContract' … … 324 327 325 328 def setup_customizable_params(self): 326 self._contract_category = u' license'329 self._contract_category = u'ron' 327 330 self._document_factory = 'waeup.PCNCustomerPDFDocument' 328 331 self._contract_factory = 'waeup.RONContract' -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/utils.py
r12484 r12488 54 54 #'SampleContract': _('Sample Contract'), 55 55 56 'RONContract': _('Retention Of Name'),56 'RONContract': _('Retention of Name'), 57 57 } 58 58 -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/tests/test_browser.py
r12371 r12488 39 39 def setup_for_export(self): 40 40 product = PCNProduct() 41 product.product_id = u'LIC' 41 product.product_id = u'RON' 42 product.contract_category = u'ron' 42 43 product.valid_from = datetime.date(2015, 12, 4) 43 44 self.app['products'][product.product_id] = self.product = product … … 54 55 self.assertEqual(result, 55 56 'contract_category,contract_title,options,' 56 'product_id,terms_and_conditions,title,valid_from,valid_to,users_with_local_roles\r\n' 57 'license,,[],LIC,,Unnamed,2015-12-04#,,[]\r\n') 57 'product_id,terms_and_conditions,title,valid_from,valid_to,' 58 'users_with_local_roles\r\n' 59 'ron,,[],RON,,Unnamed,2015-12-04#,,[]\r\n') 58 60 # We can import the same file. 59 61 processor = PCNProductProcessor() … … 61 63 self.outfile, 62 64 ['contract_category','contract_title', 'options,', 'product_id', 63 'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'], 65 'terms_and_conditions','title','valid_from','valid_to', 66 'users_with_local_roles'], 64 67 mode='create') 65 68 num, num_fail, finished_path, failed_path = result … … 68 71 self.assertEqual(num_fail,1) 69 72 # We remove the original product. 70 del self.app['products'][' LIC']73 del self.app['products']['RON'] 71 74 result = processor.doImport( 72 75 self.outfile, 73 76 ['contract_category','contract_title', 'options,', 'product_id', 74 'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'], 77 'terms_and_conditions','title','valid_from','valid_to', 78 'users_with_local_roles'], 75 79 mode='create') 76 80 num, num_fail, finished_path, failed_path = result … … 81 85 self.outfile, 82 86 ['contract_category','contract_title', 'options,', 'product_id', 83 'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'], 87 'terms_and_conditions','title','valid_from','valid_to', 88 'users_with_local_roles'], 84 89 mode='update') 85 90 num, num_fail, finished_path, failed_path = result -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/utils/utils.py
r12484 r12488 46 46 47 47 CON_CATS_DICT = { 48 ' license': 'License',48 'ron': 'Retention of Name', 49 49 'no': 'no contract', 50 50 }
Note: See TracChangeset for help on using the changeset viewer.