Changeset 12604 for main/ikobacustom.pcn
- Timestamp:
- 12 Feb 2015, 09:56:13 (10 years ago)
- Location:
- main/ikobacustom.pcn/trunk/src/ikobacustom/pcn
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/batching.py
r12601 r12604 30 30 IRPRContract, 31 31 IRPCContract, 32 IIPPMVLContract) 32 IIPPMVLContract, 33 IRPPMVLContract) 33 34 from ikobacustom.pcn.interfaces import MessageFactory as _ 34 35 … … 105 106 iface = IIPPMVLContract 106 107 factory_name = 'waeup.IPPMVLContract' 108 109 class RPPMVLContractProcessor(ContractProcessorBase): 110 """A batch processor for IRPPMVLContract objects. 111 """ 112 util_name = 'rppmvlcontractprocessor' 113 grok.name(util_name) 114 name = _('Renewal of Patent and Proprietary Medicines Vendors License (Contract) Processor') 115 iface = IRPPMVLContract 116 factory_name = 'waeup.RPPMVLContract' -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/contracts.py
r12601 r12604 48 48 IIPPMVLContractProcess, 49 49 IIPPMVLContractOfficialUse, 50 IRPPMVLContract, 51 IRPPMVLContractEdit, 52 IRPPMVLContractProcess, 53 IRPPMVLContractOfficialUse, 50 54 ) 51 55 … … 240 244 return implementedBy(IPPMVLContract) 241 245 246 class RPPMVLContract(ContractBase): 247 """Renewal of Patent and Proprietary Medicines Vendors License contract. 248 """ 249 250 grok.implements( 251 IRPPMVLContractProcess, 252 IRPPMVLContract, 253 IRPPMVLContractEdit, 254 ICustomerNavigation) 255 256 contract_category = 'rppmvl' 257 258 form_fields_interface = IRPPMVLContract 259 260 edit_form_fields_interface = IRPPMVLContractEdit 261 262 ou_form_fields_interface = IRPPMVLContractOfficialUse 263 264 check_docs_interface = IRPPMVLContract 265 266 RPPMVLContract = attrs_to_fields(RPPMVLContract) 267 268 269 class RPPMVLContractFactory(grok.GlobalUtility): 270 """A factory for contracts. 271 """ 272 grok.implements(IFactory) 273 grok.name(u'waeup.RPPMVLContract') 274 title = u"Create a new license contract.", 275 description = u"This factory instantiates new contract instances." 276 277 def __call__(self, *args, **kw): 278 return RPPMVLContract(*args, **kw) 279 280 def getInterfaces(self): 281 return implementedBy(RPPMVLContract) 282 -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/export.py
r12601 r12604 28 28 IRPRContractProcess, 29 29 IRPCContractProcess, 30 IIPPMVLContractProcess) 30 IIPPMVLContractProcess, 31 IRPPMVLContractProcess) 31 32 from ikobacustom.pcn.interfaces import MessageFactory as _ 32 33 … … 95 96 title = _(u'Issuance of Patent and Proprietary Medicines Vendors Licenses') 96 97 class_name = 'IPPMVLContract' 98 99 class RPPMVLContractExporter(ContractExporterBase): 100 """Exporter for Contract instances. 101 """ 102 grok.name('rppmvlcontracts') 103 iface = IRPPMVLContractProcess 104 title = _(u'Renewal of Patent and Proprietary Medicines Vendors Licenses') 105 class_name = 'RPPMVLContract' -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py
r12601 r12604 91 91 source = LGASource(), 92 92 title = _(u'State / LGA'), 93 required = True,93 required = False, 94 94 ) 95 95 … … 597 597 source = LGASource(), 598 598 title = _(u'State / LGA'), 599 required = True,599 required = False, 600 600 ) 601 601 … … 643 643 ) 644 644 645 referee1_occupation = schema.Text (645 referee1_occupation = schema.TextLine( 646 646 title = _(u'First Referee Occupation'), 647 647 required = False, … … 667 667 ) 668 668 669 referee2_occupation = schema.Text (669 referee2_occupation = schema.TextLine( 670 670 title = _(u'Second Referee Occupation'), 671 671 required = False, … … 711 711 ) 712 712 713 incometax_object = schema.Choice( 714 title = _(u'Income Tax Clearance'), 715 description = u'Select the pdf document which contains scanned copies ' 716 u'of your income tax clearance for the past three years. ' 717 u'You must create such a document first.', 718 source = CustomerDocumentSource(), 719 required = True, 720 ) 721 713 722 IIPPMVLContractEdit['certificates_object'].order = IIPPMVLContract[ 714 723 'certificates_object'].order 724 725 IIPPMVLContractEdit['incometax_object'].order = IIPPMVLContract[ 726 'incometax_object'].order 727 728 class IRPPMVLContract(IContract): 729 """A Renewal of Patent and Proprietary Medicines Vendors License. 730 731 """ 732 733 res_address = schema.Text( 734 title = _(u'Residential Address'), 735 required = False, 736 ) 737 738 shop_address = schema.Text( 739 title = _(u'Patent Vendor\'s Shop'), 740 description = u'Enter name and address of patent vendor\'s shop.', 741 required = False, 742 ) 743 744 shop_lga = schema.Choice( 745 source = LGASource(), 746 title = _(u'State / LGA'), 747 required = False, 748 ) 749 750 shop_email = schema.ASCIILine( 751 title = _(u'Shop Email Address'), 752 required = False, 753 constraint=validate_email, 754 ) 755 756 shop_phone = PhoneNumber( 757 title = _(u'Shop Phone'), 758 description = u'', 759 required = False, 760 ) 761 762 PPMVL_number = schema.TextLine( 763 title = _(u'PPMVL Data'), 764 description = u'State PPMVL number and date of issue of last license.', 765 required = False, 766 readonly = False, 767 ) 768 769 referee1_name = schema.TextLine( 770 title = _(u'First Referee Name'), 771 required = False, 772 readonly = False, 773 ) 774 775 referee1_address = schema.Text( 776 title = _(u'First Referee Address'), 777 required = False, 778 readonly = False, 779 ) 780 781 referee1_license = schema.TextLine( 782 title = _(u'First Referee License Number'), 783 required = False, 784 readonly = False, 785 ) 786 787 referee1_occupation = schema.TextLine( 788 title = _(u'First Referee Occupation'), 789 required = False, 790 readonly = False, 791 ) 792 793 referee2_name = schema.TextLine( 794 title = _(u'Second Referee Name'), 795 required = False, 796 readonly = False, 797 ) 798 799 referee2_address = schema.Text( 800 title = _(u'Second Referee Address'), 801 required = False, 802 readonly = False, 803 ) 804 805 referee2_license = schema.TextLine( 806 title = _(u'Second Referee License Number'), 807 required = False, 808 readonly = False, 809 ) 810 811 referee2_occupation = schema.TextLine( 812 title = _(u'Second Referee Occupation'), 813 required = False, 814 readonly = False, 815 ) 816 817 818 class IRPPMVLContractOfficialUse(IIkobaObject): 819 """Interface for editing RPPMVL official use data. 820 821 """ 822 823 comment = schema.Text( 824 title= _('Reason for rejection'), 825 required = False, 826 ) 827 828 829 class IRPPMVLContractProcess(IRPPMVLContract, IRPPMVLContractOfficialUse): 830 """Interface for processing RPPMVL data. 831 """ 832 833 product_options = schema.List( 834 title = _(u'Options/Fees'), 835 value_type = ProductOptionField(), 836 required = False, 837 readonly = False, 838 default = [], 839 ) 840 841 class IRPPMVLContractEdit(IRPPMVLContract): 842 """Interface for editing RPPMVL data by customers. 843 844 """ -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_contract.py
r12601 r12604 35 35 RPCContract, 36 36 IPPMVLContract, 37 RPPMVLContract, 37 38 ) 38 39 from ikobacustom.pcn.customers.interfaces import ( … … 42 43 IRPCContract, 43 44 IIPPMVLContract, 45 IRPPMVLContract, 44 46 ) 45 47 … … 96 98 self.assertEqual(container[id5], contract5) 97 99 self.assertEqual(contract5.class_name, 'IPPMVLContract') 100 101 contract6 = createObject(u'waeup.RPPMVLContract') 102 id6 = contract6.contract_id 103 container.addContract(contract6) 104 self.assertEqual(container[id6], contract6) 105 self.assertEqual(contract6.class_name, 'RPPMVLContract') 98 106 return -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/utils.py
r12601 r12604 60 60 'IPPMVLContract': _( 61 61 'Issuance of Patent and Proprietary Medicines Vendors License'), 62 'RPPMVLContract': _( 63 'Renewal of Patent and Proprietary Medicines Vendors License'), 62 64 } 63 65 … … 74 76 'rprcontracts', 75 77 'rpccontracts', 76 'ippmvlcontracts') 78 'ippmvlcontracts', 79 'rppmvlcontracts') -
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/utils/utils.py
r12601 r12604 51 51 'rpc': 'Registration as Pharmaceutical Chemist', 52 52 'ippmvl': 'Issuance of Patent and Proprietary Medicines Vendors License', 53 'rppmvl': 'Renewal of Patent and Proprietary Medicines Vendors License', 53 54 'no': 'no license', 54 55 } … … 76 77 'rprcontracts', 77 78 'rpccontracts', 78 'ippmvlcontracts') 79 'ippmvlcontracts', 80 'rppmvlcontracts') 79 81 80 82 BATCH_PROCESSOR_NAMES = ( … … 87 89 'rpccontractprocessor', 88 90 'ippmvlcontractprocessor', 91 'rppmvlcontractprocessor', 89 92 'pcnproductprocessor', 90 93 'pdfdocumentprocessor',
Note: See TracChangeset for help on using the changeset viewer.