[12286] | 1 | ## $Id: export.py 12611 2015-02-13 10:15:44Z 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, |
---|
| 32 | IAPPITContractProcess) |
---|
[12371] | 33 | from ikobacustom.pcn.interfaces import MessageFactory as _ |
---|
[12282] | 34 | |
---|
[12371] | 35 | class PCNCustomerExporter(CustomerExporter): |
---|
[12282] | 36 | """Exporter for Customers. |
---|
| 37 | """ |
---|
[12371] | 38 | iface = IPCNCustomer |
---|
| 39 | title = _(u'PCN Customers') |
---|
[12282] | 40 | |
---|
| 41 | |
---|
[12384] | 42 | class PCNCustomerJPGDocumentExporter(CustomerDocumentExporterBase): |
---|
[12282] | 43 | """Exporter for documents. |
---|
| 44 | """ |
---|
[12384] | 45 | grok.name('pcncustomerjpgdocuments') |
---|
| 46 | iface = IPCNCustomerJPGDocument |
---|
| 47 | title = _(u'PCN Customer JPG Documents') |
---|
| 48 | class_name = 'PCNCustomerJPGDocument' |
---|
[12282] | 49 | |
---|
[12384] | 50 | class PCNCustomerPDFDocumentExporter(CustomerDocumentExporterBase): |
---|
| 51 | """Exporter for documents. |
---|
| 52 | """ |
---|
| 53 | grok.name('pcncustomerpdfdocuments') |
---|
| 54 | iface = IPCNCustomerPDFDocument |
---|
| 55 | title = _(u'PCN Customer PDF Documents') |
---|
| 56 | class_name = 'PCNCustomerPDFDocument' |
---|
[12282] | 57 | |
---|
[12384] | 58 | |
---|
[12484] | 59 | class RONContractExporter(ContractExporterBase): |
---|
[12282] | 60 | """Exporter for Contract instances. |
---|
| 61 | """ |
---|
[12484] | 62 | grok.name('roncontracts') |
---|
[12501] | 63 | iface = IRONContractProcess |
---|
[12499] | 64 | title = _(u'Retention of Name Contracts') |
---|
[12484] | 65 | class_name = 'RONContract' |
---|
[12499] | 66 | |
---|
| 67 | |
---|
| 68 | class ROPContractExporter(ContractExporterBase): |
---|
| 69 | """Exporter for Contract instances. |
---|
| 70 | """ |
---|
| 71 | grok.name('ropcontracts') |
---|
[12501] | 72 | iface = IROPContractProcess |
---|
[12499] | 73 | title = _(u'Registration of Premises Contracts') |
---|
| 74 | class_name = 'ROPContract' |
---|
[12571] | 75 | |
---|
| 76 | class RPRContractExporter(ContractExporterBase): |
---|
| 77 | """Exporter for Contract instances. |
---|
| 78 | """ |
---|
| 79 | grok.name('rprcontracts') |
---|
| 80 | iface = IRPRContractProcess |
---|
| 81 | title = _(u'Registration in the Provisional Register Contracts') |
---|
| 82 | class_name = 'RPRContract' |
---|
[12591] | 83 | |
---|
| 84 | class RPCContractExporter(ContractExporterBase): |
---|
| 85 | """Exporter for Contract instances. |
---|
| 86 | """ |
---|
| 87 | grok.name('rpccontracts') |
---|
| 88 | iface = IRPCContractProcess |
---|
| 89 | title = _(u'Registration as Pharmaceutical Chemist Contracts') |
---|
| 90 | class_name = 'RPCContract' |
---|
[12601] | 91 | |
---|
| 92 | class IPPMVLContractExporter(ContractExporterBase): |
---|
| 93 | """Exporter for Contract instances. |
---|
| 94 | """ |
---|
| 95 | grok.name('ippmvlcontracts') |
---|
| 96 | iface = IIPPMVLContractProcess |
---|
| 97 | title = _(u'Issuance of Patent and Proprietary Medicines Vendors Licenses') |
---|
| 98 | class_name = 'IPPMVLContract' |
---|
[12604] | 99 | |
---|
| 100 | class RPPMVLContractExporter(ContractExporterBase): |
---|
| 101 | """Exporter for Contract instances. |
---|
| 102 | """ |
---|
| 103 | grok.name('rppmvlcontracts') |
---|
| 104 | iface = IRPPMVLContractProcess |
---|
| 105 | title = _(u'Renewal of Patent and Proprietary Medicines Vendors Licenses') |
---|
| 106 | class_name = 'RPPMVLContract' |
---|
[12611] | 107 | |
---|
| 108 | class APPITContractExporter(ContractExporterBase): |
---|
| 109 | """Exporter for Contract instances. |
---|
| 110 | """ |
---|
| 111 | grok.name('appitcontracts') |
---|
| 112 | iface = IAPPITContractProcess |
---|
| 113 | title = _(u'Accepting Pupil Pharmacist for Internship Training Contracts') |
---|
| 114 | class_name = 'APPITContract' |
---|