Changeset 12501 for main/ikobacustom.pcn/trunk/src/ikobacustom/pcn
- Timestamp:
- 20 Jan 2015, 18:00:40 (10 years ago)
- Location:
- main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/contracts.py
r12499 r12501 29 29 from ikobacustom.pcn.customers.interfaces import ( 30 30 IRONContract, IRONContractEdit, IRONContractProcess, 31 IROPContract, IROPContractEdit, IROPContractProcess) 31 IROPContract, IROPContractEdit, IROPContractProcess, 32 IRONContractOfficialUse, IROPContractOfficialUse) 32 33 33 34 … … 47 48 48 49 edit_form_fields_interface = IRONContractEdit 50 51 ou_form_fields_interface = IRONContractOfficialUse 49 52 50 53 check_docs_interface = IRONContract … … 84 87 edit_form_fields_interface = IROPContractEdit 85 88 89 ou_form_fields_interface = IROPContractOfficialUse 90 86 91 check_docs_interface = IROPContract 87 92 -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/export.py
r12499 r12501 23 23 from ikobacustom.pcn.customers.interfaces import ( 24 24 IPCNCustomer, IPCNCustomerJPGDocument, 25 IPCNCustomerPDFDocument, IRONContract , IROPContract)25 IPCNCustomerPDFDocument, IRONContractProcess, IROPContractProcess) 26 26 from ikobacustom.pcn.interfaces import MessageFactory as _ 27 27 … … 54 54 """ 55 55 grok.name('roncontracts') 56 iface = IRONContract 56 iface = IRONContractProcess 57 57 title = _(u'Retention of Name Contracts') 58 58 class_name = 'RONContract' … … 63 63 """ 64 64 grok.name('ropcontracts') 65 iface = IROPContract 65 iface = IROPContractProcess 66 66 title = _(u'Registration of Premises Contracts') 67 67 class_name = 'ROPContract' -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py
r12499 r12501 19 19 from zope import schema 20 20 from datetime import datetime 21 from waeup.ikoba.interfaces import IIkobaObject 21 22 from waeup.ikoba.customers.interfaces import ( 22 23 ICustomer, ICustomerDocument, ICustomerPDFDocument, IContract, … … 127 128 # ) 128 129 129 class IRONContractProcess(IRONContract): 130 class IRONContractOfficialUse(IIkobaObject): 131 """Interface for editing ROP data by customers. 132 133 """ 134 135 comment = schema.Text( 136 title= _('Reason for rejection'), 137 required = False, 138 ) 139 140 141 class IRONContractProcess(IRONContract, IRONContractOfficialUse): 130 142 """Interface for processing RON data. 131 143 """ … … 156 168 """ 157 169 158 date_of_birth = FormattedDate( 159 title = _(u'Date of Birth'), 160 required = True, 170 premises_address = schema.Text( 171 title = _(u'Name and Address of Pharmaceutical Premises'), 172 required = True, 173 ) 174 175 category_practice = schema.TextLine( 176 title = _(u'Category of Practice'), 177 description = _(u'retail and dispensing, wholesale, importation, manufacturing, distribution etc.'), 178 required = False, 179 ) 180 181 premises_certificate = schema.TextLine( 182 title = _(u'Last Premises Certificate'), 183 description= _('If an old premises. state the last premises certificate number issued with date.'), 184 required = False, 185 ) 186 187 date_of_qualification = FormattedDate( 188 title = _(u'Date of Qualification'), 189 required = False, 161 190 show_year = True, 162 )163 164 state_of_origin = schema.Choice(165 vocabulary = nats_vocab,166 title = _(u'State of Origin'),167 required = False,168 )169 170 lga = schema.Choice(171 source = LGASource(),172 title = _(u'State / LGA'),173 required = True,174 )175 176 year_qualification = schema.Choice(177 title = _(u'Year of Qualification'),178 required = True,179 values = year_range(),180 191 ) 181 192 182 193 res_address = schema.Text( 183 194 title = _(u'Residential Address'), 184 required = True, 185 ) 186 187 res_address = schema.Text( 188 title = _(u'Residential Address'), 189 required = False, 190 ) 191 192 work_address = schema.Text( 193 title = _(u'Work Address'), 194 required = False, 195 ) 196 197 work_email = schema.ASCIILine( 198 title = _(u'Work Email Address'), 199 required = False, 200 constraint=validate_email, 201 ) 202 203 work_phone = PhoneNumber( 204 title = _(u'Work Phone'), 205 description = u'', 206 required = False, 207 ) 208 209 category_practice = schema.TextLine( 210 title = _(u'Category of Practice'), 211 description = _(u'academic, retail and dispensing, hospital, administrative, wholesale, importation, manufacturing, etc.'), 195 required = False, 196 ) 197 198 last_license_number = schema.TextLine( 199 title = _(u'Last Annual License Number'), 212 200 required = False, 213 201 ) … … 215 203 superintendent = schema.Bool( 216 204 title= _('Superintendent'), 217 description= _('Tick box if you are a superintendent pharamcist.'), 205 description= _('Tick box if you were a superintendent pharamcist last year.'), 206 required = False, 207 ) 208 209 work_address = schema.Text( 210 title = _(u'Full Time Employment Address'), 211 description= _('Enter work address if you were not a superintendent pharamcist last year.'), 212 required = False, 213 ) 214 215 pharmacists_directors= schema.TextLine( 216 title = _(u'Pharmacist Directors'), 217 description = _(u'Full name of directors and their profession as in Form C.O.7'), 218 required = False, 219 ) 220 221 other_directors= schema.TextLine( 222 title = _(u'Other Directors'), 223 description = _(u'Full name of directors and their profession as in Form C.O.7'), 218 224 required = False, 219 225 ) … … 225 231 # ) 226 232 227 class IROPContractProcess(IROPContract): 233 class IROPContractOfficialUse(IIkobaObject): 234 """Interface for editing ROP data by customers. 235 236 """ 237 238 inspected = schema.Bool( 239 title = _('Inspected'), 240 description = _('Has the premises been duly inspected?'), 241 required = False, 242 ) 243 244 recommended = schema.Bool( 245 title = _('Recommended'), 246 description= _('Is the premises recommended?'), 247 required = False, 248 ) 249 250 official_in_state = schema.TextLine( 251 title = _(u'Name of Official in the State'), 252 required = False, 253 ) 254 255 class IROPContractProcess(IROPContract, IROPContractOfficialUse): 228 256 """Interface for processing RON data. 229 257 """ -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_browser.py
r12499 r12501 220 220 result = open(self.outfile, 'rb').read() 221 221 self.assertMatches(result, 222 'category_practice,class_name,co ntract_category,contract_id,'222 'category_practice,class_name,comment,contract_category,contract_id,' 223 223 'date_of_birth,history,last_product_id,lga,product_object,' 224 224 'product_options,res_address,state,state_of_origin,superintendent,' 225 225 'tc_dict,title,user_id,work_address,work_email,work_phone,' 226 226 'year_qualification\r\n' 227 ',RONContract, ron,%s,,'227 ',RONContract,,ron,%s,,' 228 228 '[u\'2015-01-18 16:40:01 WAT - Contract created by system\'],,,,' 229 229 '[],,created,,,{\'en\': u\'Hello World\'},,K1000000,,,,\r\n' … … 280 280 self.assertMatches(result, 281 281 'category_practice,class_name,contract_category,contract_id,' 282 'date_of_birth,history,last_product_id,lga,product_object,' 283 'product_options,res_address,state,state_of_origin,superintendent,' 284 'tc_dict,title,user_id,work_address,work_email,work_phone,' 285 'year_qualification\r\n' 282 'date_of_qualification,history,inspected,last_license_number,' 283 'last_product_id,official_in_state,other_directors,' 284 'pharmacists_directors,premises_address,premises_certificate,' 285 'product_object,product_options,recommended,res_address,' 286 'state,superintendent,tc_dict,title,user_id,work_address\r\n' 287 286 288 ',ROPContract,rop,%s,,' 287 '[u\'2015-01- 18 16:40:01 WAT - Contract created by system\'],,,,'288 ' [],,created,,,{\'en\': u\'Hello World\'},,K1000000,,,,\r\n'289 '[u\'2015-01-20 18:51:03 WAT - Contract created by system\']' 290 ',,,,,,,,,,[],,,created,,{\'en\': u\'Hello World\'},,K1000000,\r\n' 289 291 % self.contract2.contract_id) 290 292 # We can reimport the file if we change the header
Note: See TracChangeset for help on using the changeset viewer.