[12272] | 1 | ## $Id: interfaces.py 12273 2014-12-21 06:43:59Z henrik $ |
---|
| 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 | ## |
---|
| 18 | |
---|
| 19 | from zope import schema |
---|
| 20 | from waeup.ikoba.customers.interfaces import ( |
---|
| 21 | ICustomer, ICustomerDocument, IContract) |
---|
[12273] | 22 | from waeup.ikoba.customers.vocabularies import ( |
---|
| 23 | contextual_reg_num_source, GenderSource, nats_vocab, |
---|
| 24 | ConCatProductSource, CustomerDocumentSource) |
---|
[12272] | 25 | from ikobacustom.skeleton.interfaces import MessageFactory as _ |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | class ISkeletonCustomer(ICustomer): |
---|
| 29 | """Representation of a customer. |
---|
| 30 | |
---|
| 31 | """ |
---|
| 32 | |
---|
| 33 | # Customer document interfaces |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | class ISkeletonCustomerDocument(ICustomerDocument): |
---|
| 37 | """A customer document. |
---|
| 38 | |
---|
| 39 | """ |
---|
| 40 | |
---|
| 41 | # Customer contract interfaces |
---|
| 42 | |
---|
| 43 | class ISkeletonContract(IContract): |
---|
| 44 | """A customer contract sample with document attached. |
---|
| 45 | |
---|
| 46 | """ |
---|
| 47 | |
---|
| 48 | document_object = schema.Choice( |
---|
| 49 | title = _(u'Document'), |
---|
| 50 | source = CustomerDocumentSource(), |
---|
| 51 | required = False, |
---|
| 52 | ) |
---|
[12273] | 53 | |
---|
| 54 | class ISkeletonContractEdit(ISkeletonContract): |
---|
| 55 | """Interface for editing sample contract data by customers. |
---|
| 56 | |
---|
| 57 | """ |
---|
| 58 | |
---|
| 59 | product_object = schema.Choice( |
---|
| 60 | title = _(u'Product'), |
---|
| 61 | source = ConCatProductSource(), |
---|
| 62 | required = True, |
---|
| 63 | ) |
---|
| 64 | |
---|
| 65 | document_object = schema.Choice( |
---|
| 66 | title = _(u'Document'), |
---|
| 67 | source = CustomerDocumentSource(), |
---|
| 68 | required = True, |
---|
| 69 | ) |
---|