Changeset 12617 for main/ikobacustom.pcn/trunk/src
- Timestamp:
- 14 Feb 2015, 17:22:51 (10 years ago)
- Location:
- main/ikobacustom.pcn/trunk/src/ikobacustom/pcn
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/batching.py
r12616 r12617 33 33 IRPPMVLContract, 34 34 IAPPITContract, 35 IRPTContract 35 IRPTContract, 36 IAPPTContract 36 37 ) 37 38 from ikobacustom.pcn.interfaces import MessageFactory as _ … … 136 137 iface = IRPTContract 137 138 factory_name = 'waeup.RPTContract' 139 140 class APPTContractProcessor(ContractProcessorBase): 141 """A batch processor for IAPPTContract objects. 142 """ 143 util_name = 'apptcontractprocessor' 144 grok.name(util_name) 145 name = _('License Processor: Annual Permit for Pharmacy Technician') 146 iface = IAPPTContract 147 factory_name = 'waeup.APPTContract' -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/browser.py
r12612 r12617 23 23 PDFContractSlipPage, CustomerBaseEditFormPage) 24 24 from ikobacustom.pcn.interfaces import MessageFactory as _ 25 from ikobacustom.pcn.customers.interfaces import IRPCContract, IAPPITContract 25 from ikobacustom.pcn.customers.interfaces import ( 26 IRPCContract, IAPPITContract, IAPPTContract) 26 27 27 28 class PDFContractSlipPage(PDFContractSlipPage): … … 62 63 ) 63 64 65 class PDFAPPTContractSlipPage(PDFContractSlipPage): 66 """Deliver pdf file including metadata. 67 """ 68 69 grok.context(IAPPTContract) 70 71 def _sigsInFooter(self): 72 return (_('Date, Signature of Applicant'), 73 _('Date, Signature of Supervisor'), 74 ) 75 64 76 class CustomerBaseEditFormPage(CustomerBaseEditFormPage): 65 77 """ View to edit customer base data -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/contracts.py
r12615 r12617 60 60 IRPTContractProcess, 61 61 IRPTContractOfficialUse, 62 IAPPTContract, 63 IAPPTContractEdit, 64 IAPPTContractProcess, 65 IAPPTContractOfficialUse, 62 66 ) 63 67 … … 366 370 return implementedBy(RPTContract) 367 371 372 373 class APPTContract(ContractBase): 374 """Annual Permit for Pharmacy Technician contract. 375 """ 376 377 grok.implements( 378 IAPPTContractProcess, 379 IAPPTContract, 380 IAPPTContractEdit, 381 ICustomerNavigation) 382 383 contract_category = 'appt' 384 385 form_fields_interface = IAPPTContract 386 387 edit_form_fields_interface = IAPPTContractEdit 388 389 ou_form_fields_interface = IAPPTContractOfficialUse 390 391 check_docs_interface = IAPPTContract 392 393 APPTContract = attrs_to_fields(APPTContract) 394 395 396 class APPTContractFactory(grok.GlobalUtility): 397 """A factory for contracts. 398 """ 399 grok.implements(IFactory) 400 grok.name(u'waeup.APPTContract') 401 title = u"Create a new license contract.", 402 description = u"This factory instantiates new contract instances." 403 404 def __call__(self, *args, **kw): 405 return APPTContract(*args, **kw) 406 407 def getInterfaces(self): 408 return implementedBy(APPTContract) 409 -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/export.py
r12616 r12617 31 31 IRPPMVLContractProcess, 32 32 IAPPITContractProcess, 33 IRPTContractProcess) 33 IRPTContractProcess, 34 IAPPTContractProcess) 34 35 from ikobacustom.pcn.interfaces import MessageFactory as _ 35 36 … … 122 123 title = _(u'Licenses: Registration as a Pharmacy Technician') 123 124 class_name = 'RPTContract' 125 126 class APPTContractExporter(ContractExporterBase): 127 """Exporter for Contract instances. 128 """ 129 grok.name('apptcontracts') 130 iface = IAPPTContractProcess 131 title = _(u'Licenses: Annual Permit for Pharmacy Technician') 132 class_name = 'APPTContract' -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py
r12615 r12617 1128 1128 1129 1129 """ 1130 1131 class IAPPTContract(IContract): 1132 """An Annual Permit for Pharmacy Technician contract. 1133 1134 """ 1135 1136 state_of_origin = schema.Choice( 1137 vocabulary = nats_vocab, 1138 title = _(u'State of Origin'), 1139 required = False, 1140 ) 1141 1142 lga = schema.Choice( 1143 source = LGASource(), 1144 title = _(u'State / LGA'), 1145 required = False, 1146 ) 1147 1148 office_address = schema.Text( 1149 title = _(u'Offices or Business Address'), 1150 required = False, 1151 ) 1152 1153 res_address = schema.Text( 1154 title = _(u'Residential Address'), 1155 required = False, 1156 ) 1157 1158 employed = schema.Bool( 1159 title= _('Employment'), 1160 description= _('Tick box if you were employed last year.'), 1161 required = False, 1162 ) 1163 1164 supervisor = schema.TextLine( 1165 title = _(u'Supervisor'), 1166 description= _('Enter name of supervisor.'), 1167 required = False, 1168 readonly = False, 1169 ) 1170 1171 supervisor_licensenumber = schema.TextLine( 1172 title = _(u'Supervisor License Number'), 1173 required = False, 1174 readonly = False, 1175 ) 1176 1177 reason_leaving = schema.Text( 1178 title = _(u'Reason for Leaving'), 1179 description= _('Tell the reason for leaving emplayment last ' 1180 'year (if applicable)'), 1181 required = False, 1182 readonly = False, 1183 ) 1184 1185 1186 courses_attended = schema.Text( 1187 title = _(u'Courses, Workshops etc. Attended'), 1188 required = False, 1189 readonly = False, 1190 ) 1191 1192 1193 class IAPPTContractOfficialUse(IIkobaObject): 1194 """Interface for editing APPT official use data. 1195 1196 """ 1197 1198 comment = schema.Text( 1199 title= _('Reason for rejection'), 1200 required = False, 1201 ) 1202 1203 1204 class IAPPTContractProcess(IAPPTContract, IAPPTContractOfficialUse): 1205 """Interface for processing APPT data. 1206 """ 1207 1208 product_options = schema.List( 1209 title = _(u'Options/Fees'), 1210 value_type = ProductOptionField(), 1211 required = False, 1212 readonly = False, 1213 default = [], 1214 ) 1215 1216 class IAPPTContractEdit(IAPPTContract): 1217 """Interface for editing APPT data by customers. 1218 1219 """ -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_contract.py
r12615 r12617 38 38 APPITContract, 39 39 RPTContract, 40 APPTContract, 40 41 ) 41 42 from ikobacustom.pcn.customers.interfaces import ( … … 48 49 IAPPITContract, 49 50 IRPTContract, 51 IAPPTContract, 50 52 ) 51 53 … … 124 126 self.assertEqual(container[id8], contract8) 125 127 self.assertEqual(contract8.class_name, 'RPTContract') 128 129 contract9= createObject(u'waeup.APPTContract') 130 id9 = contract9.contract_id 131 container.addContract(contract9) 132 self.assertEqual(container[id9], contract9) 133 self.assertEqual(contract9.class_name, 'APPTContract') 126 134 return -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/utils.py
r12615 r12617 64 64 'APPITContract': _( 65 65 'Accepting Pupil Pharmacist for Internship Training'), 66 'RPTContract': _( 67 'Registration as aPharmacy Technician'),66 'RPTContract': _('Registration as a Pharmacy Technician'), 67 'APPTContract': _('Annual Permit for Pharmacy Technician'), 68 68 } 69 69 … … 86 86 'rppmvlcontracts', 87 87 'appitcontracts', 88 'rptcontracts') 88 'rptcontracts', 89 'apptcontracts') -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/utils/utils.py
r12615 r12617 54 54 'appit': 'Accepting Pupil Pharmacist for Internship Training', 55 55 'rpt': 'Registration as a Pharmacy Technician', 56 'appt': 'Annual Permit for Pharmacy Technician', 56 57 'no': 'no license', 57 58 } … … 82 83 'rppmvlcontracts', 83 84 'appitcontracts', 84 'rptcontracts',) 85 'rptcontracts', 86 'apptcontracts') 85 87 86 88 BATCH_PROCESSOR_NAMES = ( … … 96 98 'appitcontractprocessor', 97 99 'rptcontractprocessor', 100 'apptcontractprocessor', 98 101 'pcnproductprocessor', 99 102 'pdfdocumentprocessor',
Note: See TracChangeset for help on using the changeset viewer.