- Timestamp:
- 11 Feb 2015, 21:38:41 (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
r12591 r12601 29 29 IROPContract, 30 30 IRPRContract, 31 IRPCContract) 31 IRPCContract, 32 IIPPMVLContract) 32 33 from ikobacustom.pcn.interfaces import MessageFactory as _ 33 34 … … 95 96 iface = IRPCContract 96 97 factory_name = 'waeup.RPCContract' 98 99 class IPPMVLContractProcessor(ContractProcessorBase): 100 """A batch processor for IIPPMVLContract objects. 101 """ 102 util_name = 'ippmvlcontractprocessor' 103 grok.name(util_name) 104 name = _('Issuance of Patent and Proprietary Medicines Vendors License (Contract) Processor') 105 iface = IIPPMVLContract 106 factory_name = 'waeup.IPPMVLContract' -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/contracts.py
r12591 r12601 44 44 IRPCContractProcess, 45 45 IRPCContractOfficialUse, 46 IIPPMVLContract, 47 IIPPMVLContractEdit, 48 IIPPMVLContractProcess, 49 IIPPMVLContractOfficialUse, 46 50 ) 47 51 … … 198 202 return implementedBy(RPCContract) 199 203 204 205 class IPPMVLContract(ContractBase): 206 """Issuance of Patent and Proprietary Medicines Vendors License contract. 207 """ 208 209 grok.implements( 210 IIPPMVLContractProcess, 211 IIPPMVLContract, 212 IIPPMVLContractEdit, 213 ICustomerNavigation) 214 215 contract_category = 'ippmvl' 216 217 form_fields_interface = IIPPMVLContract 218 219 edit_form_fields_interface = IIPPMVLContractEdit 220 221 ou_form_fields_interface = IIPPMVLContractOfficialUse 222 223 check_docs_interface = IIPPMVLContract 224 225 IPPMVLContract = attrs_to_fields(IPPMVLContract) 226 227 228 class IPPMVLContractFactory(grok.GlobalUtility): 229 """A factory for contracts. 230 """ 231 grok.implements(IFactory) 232 grok.name(u'waeup.IPPMVLContract') 233 title = u"Create a new license contract.", 234 description = u"This factory instantiates new contract instances." 235 236 def __call__(self, *args, **kw): 237 return IPPMVLContract(*args, **kw) 238 239 def getInterfaces(self): 240 return implementedBy(IPPMVLContract) 241 -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/export.py
r12591 r12601 27 27 IROPContractProcess, 28 28 IRPRContractProcess, 29 IRPCContractProcess) 29 IRPCContractProcess, 30 IIPPMVLContractProcess) 30 31 from ikobacustom.pcn.interfaces import MessageFactory as _ 31 32 … … 86 87 title = _(u'Registration as Pharmaceutical Chemist Contracts') 87 88 class_name = 'RPCContract' 89 90 class IPPMVLContractExporter(ContractExporterBase): 91 """Exporter for Contract instances. 92 """ 93 grok.name('ippmvlcontracts') 94 iface = IIPPMVLContractProcess 95 title = _(u'Issuance of Patent and Proprietary Medicines Vendors Licenses') 96 class_name = 'IPPMVLContract' -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py
r12600 r12601 416 416 417 417 class IRPCContract(IContract): 418 """A Registration as Pharmaceutical Chemist .418 """A Registration as Pharmaceutical Chemist contract. 419 419 420 420 """ … … 552 552 IRPCContractEdit['certificates_object'].order = IRPCContract[ 553 553 'certificates_object'].order 554 555 class IIPPMVLContract(IContract): 556 """A Issuance of Patent and Proprietary Medicines Vendors License. 557 558 """ 559 560 res_address = schema.Text( 561 title = _(u'Residential Address'), 562 required = False, 563 ) 564 565 qualifications = schema.Text( 566 title = _(u'Educational Qualifications'), 567 description = u'Enter a list of certificates obtained.', 568 required = False, 569 readonly = False, 570 ) 571 572 certificates_object = schema.Choice( 573 title = _(u'Certificates/Credentials'), 574 description = u'Select the pdf document which contains scanned copies ' 575 u'of your certificates. You must create such a ' 576 u'document first.', 577 source = CustomerDocumentSource(), 578 required = False, 579 ) 580 581 incometax_object = schema.Choice( 582 title = _(u'Income Tax Clearance'), 583 description = u'Select the pdf document which contains scanned copies ' 584 u'of your income tax clearance for the past three years. ' 585 u'You must create such a document first.', 586 source = CustomerDocumentSource(), 587 required = False, 588 ) 589 590 shop_address = schema.Text( 591 title = _(u'Patent Vendor\'s Shop'), 592 description = u'Enter name and address of patent vendor\'s shop.', 593 required = False, 594 ) 595 596 shop_lga = schema.Choice( 597 source = LGASource(), 598 title = _(u'State / LGA'), 599 required = True, 600 ) 601 602 shop_email = schema.ASCIILine( 603 title = _(u'Shop Email Address'), 604 required = False, 605 constraint=validate_email, 606 ) 607 608 shop_phone = PhoneNumber( 609 title = _(u'Shop Phone'), 610 description = u'', 611 required = False, 612 ) 613 614 old_or_new = schema.Choice( 615 values=[_(u'old'), _(u'new')], 616 title = _(u'Old or New Shop'), 617 required = False, 618 ) 619 620 PPMVL_number = schema.TextLine( 621 title = _(u'PPMVL Data'), 622 description = u'If an old store, state PPMVL number and date of issue.', 623 required = False, 624 readonly = False, 625 ) 626 627 referee1_name = schema.TextLine( 628 title = _(u'First Referee Name'), 629 required = False, 630 readonly = False, 631 ) 632 633 referee1_address = schema.Text( 634 title = _(u'First Referee Address'), 635 required = False, 636 readonly = False, 637 ) 638 639 referee1_license = schema.TextLine( 640 title = _(u'First Referee License Number'), 641 required = False, 642 readonly = False, 643 ) 644 645 referee1_occupation = schema.Text( 646 title = _(u'First Referee Occupation'), 647 required = False, 648 readonly = False, 649 ) 650 651 referee2_name = schema.TextLine( 652 title = _(u'Second Referee Name'), 653 required = False, 654 readonly = False, 655 ) 656 657 referee2_address = schema.Text( 658 title = _(u'Second Referee Address'), 659 required = False, 660 readonly = False, 661 ) 662 663 referee2_license = schema.TextLine( 664 title = _(u'Second Referee License Number'), 665 required = False, 666 readonly = False, 667 ) 668 669 referee2_occupation = schema.Text( 670 title = _(u'Second Referee Occupation'), 671 required = False, 672 readonly = False, 673 ) 674 675 676 class IIPPMVLContractOfficialUse(IIkobaObject): 677 """Interface for editing IPPMVL official use data. 678 679 """ 680 681 comment = schema.Text( 682 title= _('Reason for rejection'), 683 required = False, 684 ) 685 686 687 class IIPPMVLContractProcess(IIPPMVLContract, IIPPMVLContractOfficialUse): 688 """Interface for processing IPPMVL data. 689 """ 690 691 product_options = schema.List( 692 title = _(u'Options/Fees'), 693 value_type = ProductOptionField(), 694 required = False, 695 readonly = False, 696 default = [], 697 ) 698 699 class IIPPMVLContractEdit(IIPPMVLContract): 700 """Interface for editing IPPMVL data by customers. 701 702 """ 703 704 certificates_object = schema.Choice( 705 title = _(u'Certificates'), 706 description = u'Select the document which contains scanned copies ' 707 u'of your certificates. You must create such a ' 708 u'document first.', 709 source = CustomerDocumentSource(), 710 required = True, 711 ) 712 713 IIPPMVLContractEdit['certificates_object'].order = IIPPMVLContract[ 714 'certificates_object'].order -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_contract.py
r12591 r12601 34 34 RPRContract, 35 35 RPCContract, 36 IPPMVLContract, 36 37 ) 37 38 from ikobacustom.pcn.customers.interfaces import ( … … 40 41 IRPRContract, 41 42 IRPCContract, 43 IIPPMVLContract, 42 44 ) 43 45 … … 58 60 verify.verifyObject(IRPCContract, RPCContract()) 59 61 verify.verifyObject(ICustomerNavigation, RPCContract()) 62 verify.verifyObject(IIPPMVLContract, IPPMVLContract()) 63 verify.verifyObject(ICustomerNavigation, IPPMVLContract()) 60 64 return 61 65 … … 86 90 self.assertEqual(container[id4], contract4) 87 91 self.assertEqual(contract4.class_name, 'RPCContract') 92 93 contract5 = createObject(u'waeup.IPPMVLContract') 94 id5 = contract5.contract_id 95 container.addContract(contract5) 96 self.assertEqual(container[id5], contract5) 97 self.assertEqual(contract5.class_name, 'IPPMVLContract') 88 98 return -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/utils.py
r12591 r12601 58 58 'RPRContract': _('Registration in the Provisional Register'), 59 59 'RPCContract': _('Registration as Pharmaceutical Chemist'), 60 'IPPMVLContract': _( 61 'Issuance of Patent and Proprietary Medicines Vendors License'), 60 62 } 61 63 … … 71 73 'ropcontracts', 72 74 'rprcontracts', 73 'rpccontracts') 75 'rpccontracts', 76 'ippmvlcontracts') -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/utils/lgas.py
r12175 r12601 68 68 ('akwa_ibom_itu','Akwa Ibom / Itu'), 69 69 ('akwa_ibom_mbo','Akwa Ibom / Mbo'), 70 ('akwa_ibom_mkpat-enin','Akwa Ibom / M kpat-Enin'),70 ('akwa_ibom_mkpat-enin','Akwa Ibom / Mpat-Enin'), 71 71 ('akwa_ibom_nsit-atai','Akwa Ibom / Nsit-Atai'), 72 72 ('akwa_ibom_nsit-ibom','Akwa Ibom / Nsit-Ibom'), -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/utils/utils.py
r12591 r12601 50 50 'rpr': 'Registration in the Provisional Register', 51 51 'rpc': 'Registration as Pharmaceutical Chemist', 52 'ippmvl': 'Issuance of Patent and Proprietary Medicines Vendors License', 52 53 'no': 'no license', 53 54 } … … 74 75 'ropcontracts', 75 76 'rprcontracts', 76 'rpccontracts') 77 'rpccontracts', 78 'ippmvlcontracts') 77 79 78 80 BATCH_PROCESSOR_NAMES = ( … … 84 86 'rprcontractprocessor', 85 87 'rpccontractprocessor', 88 'ippmvlcontractprocessor', 86 89 'pcnproductprocessor', 87 90 'pdfdocumentprocessor',
Note: See TracChangeset for help on using the changeset viewer.