[12286] | 1 | ## $Id: export.py 12617 2015-02-14 17:22:51Z henrik $ |
---|
[12282] | 2 | ## |
---|
| 3 | ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann |
---|
| 4 | ## This program is free software; you can redistribute it and/or modify |
---|
| 5 | ## it under the terms of the GNU General Public License as published by |
---|
| 6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | ## (at your option) any later version. |
---|
| 8 | ## |
---|
| 9 | ## This program is distributed in the hope that it will be useful, |
---|
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | ## GNU General Public License for more details. |
---|
| 13 | ## |
---|
| 14 | ## You should have received a copy of the GNU General Public License |
---|
| 15 | ## along with this program; if not, write to the Free Software |
---|
| 16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | ## |
---|
[12371] | 18 | """Exporters for pcn customer objects and subobjects. |
---|
[12282] | 19 | """ |
---|
| 20 | import grok |
---|
| 21 | from waeup.ikoba.customers.export import ( |
---|
| 22 | CustomerExporter, CustomerDocumentExporterBase, ContractExporterBase) |
---|
[12371] | 23 | from ikobacustom.pcn.customers.interfaces import ( |
---|
[12384] | 24 | IPCNCustomer, IPCNCustomerJPGDocument, |
---|
[12571] | 25 | IPCNCustomerPDFDocument, |
---|
| 26 | IRONContractProcess, |
---|
| 27 | IROPContractProcess, |
---|
[12591] | 28 | IRPRContractProcess, |
---|
[12601] | 29 | IRPCContractProcess, |
---|
[12604] | 30 | IIPPMVLContractProcess, |
---|
[12611] | 31 | IRPPMVLContractProcess, |
---|
[12615] | 32 | IAPPITContractProcess, |
---|
[12617] | 33 | IRPTContractProcess, |
---|
| 34 | IAPPTContractProcess) |
---|
[12371] | 35 | from ikobacustom.pcn.interfaces import MessageFactory as _ |
---|
[12282] | 36 | |
---|
[12371] | 37 | class PCNCustomerExporter(CustomerExporter): |
---|
[12282] | 38 | """Exporter for Customers. |
---|
| 39 | """ |
---|
[12371] | 40 | iface = IPCNCustomer |
---|
| 41 | title = _(u'PCN Customers') |
---|
[12282] | 42 | |
---|
| 43 | |
---|
[12384] | 44 | class PCNCustomerJPGDocumentExporter(CustomerDocumentExporterBase): |
---|
[12282] | 45 | """Exporter for documents. |
---|
| 46 | """ |
---|
[12384] | 47 | grok.name('pcncustomerjpgdocuments') |
---|
| 48 | iface = IPCNCustomerJPGDocument |
---|
| 49 | title = _(u'PCN Customer JPG Documents') |
---|
| 50 | class_name = 'PCNCustomerJPGDocument' |
---|
[12282] | 51 | |
---|
[12384] | 52 | class PCNCustomerPDFDocumentExporter(CustomerDocumentExporterBase): |
---|
| 53 | """Exporter for documents. |
---|
| 54 | """ |
---|
| 55 | grok.name('pcncustomerpdfdocuments') |
---|
| 56 | iface = IPCNCustomerPDFDocument |
---|
| 57 | title = _(u'PCN Customer PDF Documents') |
---|
| 58 | class_name = 'PCNCustomerPDFDocument' |
---|
[12282] | 59 | |
---|
[12384] | 60 | |
---|
[12484] | 61 | class RONContractExporter(ContractExporterBase): |
---|
[12282] | 62 | """Exporter for Contract instances. |
---|
| 63 | """ |
---|
[12484] | 64 | grok.name('roncontracts') |
---|
[12501] | 65 | iface = IRONContractProcess |
---|
[12616] | 66 | title = _(u'Licenses: Retention of Name') |
---|
[12484] | 67 | class_name = 'RONContract' |
---|
[12499] | 68 | |
---|
| 69 | |
---|
| 70 | class ROPContractExporter(ContractExporterBase): |
---|
| 71 | """Exporter for Contract instances. |
---|
| 72 | """ |
---|
| 73 | grok.name('ropcontracts') |
---|
[12501] | 74 | iface = IROPContractProcess |
---|
[12616] | 75 | title = _(u'Licenses: Registration of Premises') |
---|
[12499] | 76 | class_name = 'ROPContract' |
---|
[12571] | 77 | |
---|
| 78 | class RPRContractExporter(ContractExporterBase): |
---|
| 79 | """Exporter for Contract instances. |
---|
| 80 | """ |
---|
| 81 | grok.name('rprcontracts') |
---|
| 82 | iface = IRPRContractProcess |
---|
[12616] | 83 | title = _(u'Licenses: Registration in the Provisional Register') |
---|
[12571] | 84 | class_name = 'RPRContract' |
---|
[12591] | 85 | |
---|
| 86 | class RPCContractExporter(ContractExporterBase): |
---|
| 87 | """Exporter for Contract instances. |
---|
| 88 | """ |
---|
| 89 | grok.name('rpccontracts') |
---|
| 90 | iface = IRPCContractProcess |
---|
[12616] | 91 | title = _(u'Licenses: Registration as Pharmaceutical Chemist') |
---|
[12591] | 92 | class_name = 'RPCContract' |
---|
[12601] | 93 | |
---|
| 94 | class IPPMVLContractExporter(ContractExporterBase): |
---|
| 95 | """Exporter for Contract instances. |
---|
| 96 | """ |
---|
| 97 | grok.name('ippmvlcontracts') |
---|
| 98 | iface = IIPPMVLContractProcess |
---|
[12616] | 99 | title = _(u'Licenses: Issuance of Patent and Proprietary Medicines Vendors') |
---|
[12601] | 100 | class_name = 'IPPMVLContract' |
---|
[12604] | 101 | |
---|
| 102 | class RPPMVLContractExporter(ContractExporterBase): |
---|
| 103 | """Exporter for Contract instances. |
---|
| 104 | """ |
---|
| 105 | grok.name('rppmvlcontracts') |
---|
| 106 | iface = IRPPMVLContractProcess |
---|
[12616] | 107 | title = _(u'Licenses: Renewal of Patent and Proprietary Medicines Vendors') |
---|
[12604] | 108 | class_name = 'RPPMVLContract' |
---|
[12611] | 109 | |
---|
| 110 | class APPITContractExporter(ContractExporterBase): |
---|
| 111 | """Exporter for Contract instances. |
---|
| 112 | """ |
---|
| 113 | grok.name('appitcontracts') |
---|
| 114 | iface = IAPPITContractProcess |
---|
[12616] | 115 | title = _(u'Licenses: Accepting Pupil Pharmacist for Internship Training') |
---|
[12611] | 116 | class_name = 'APPITContract' |
---|
[12615] | 117 | |
---|
| 118 | class RPTContractExporter(ContractExporterBase): |
---|
| 119 | """Exporter for Contract instances. |
---|
| 120 | """ |
---|
| 121 | grok.name('rptcontracts') |
---|
| 122 | iface = IRPTContractProcess |
---|
[12616] | 123 | title = _(u'Licenses: Registration as a Pharmacy Technician') |
---|
[12615] | 124 | class_name = 'RPTContract' |
---|
[12617] | 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' |
---|