## $Id: interfaces.py 12502 2015-01-20 18:09:03Z henrik $ ## ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## from zope import schema from waeup.ikoba.interfaces import IIkobaObject from waeup.ikoba.customers.interfaces import ( ICustomer, ICustomerDocument, IContract) from waeup.ikoba.customers.vocabularies import ( ConCatProductSource, CustomerDocumentSource) from waeup.ikoba.products.productoptions import ProductOptionField from ikobacustom.skeleton.interfaces import MessageFactory as _ class ISkeletonCustomer(ICustomer): """Representation of a customer. """ # Customer document interfaces class ISkeletonCustomerDocument(ICustomerDocument): """A customer document. """ # Customer contract interfaces class ISkeletonContract(IContract): """A customer contract sample with document attached. """ document_object = schema.Choice( title = _(u'Document'), source = CustomerDocumentSource(), required = False, ) class ISkeletonContractOfficialUse(IIkobaObject): """Interface for editing official use data. """ comment = schema.Text( title= _('Reason for rejection'), required = False, ) class ISkeletonContractProcess(ISkeletonContract, ISkeletonContractOfficialUse): """Interface for processing contract data. """ product_options = schema.List( title = _(u'Options/Fees'), value_type = ProductOptionField(), required = False, readonly = False, default = [], ) class ISkeletonContractEdit(ISkeletonContract): """Interface for editing sample contract data by customers. """ document_object = schema.Choice( title = _(u'Document'), source = CustomerDocumentSource(), required = True, )