## $Id: interfaces.py 12401 2015-01-05 07:45:40Z 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.customers.interfaces import ( ICustomer, ICustomerDocument, ICustomerPDFDocument, IContract) from waeup.ikoba.customers.vocabularies import ( ConCatProductSource, CustomerDocumentSource) from waeup.ikoba.products.productoptions import ProductOptionField from ikobacustom.pcn.interfaces import MessageFactory as _ class IPCNCustomer(ICustomer): """Representation of a customer. """ # Customer document interfaces class IPCNCustomerJPGDocument(ICustomerDocument): """A customer jpg document. """ class IPCNCustomerPDFDocument(ICustomerPDFDocument): """A customer pdf document. """ # Customer contract interfaces class IPCNLicenseContract(IContract): """A customer contract sample with document attached. """ document_object = schema.Choice( title = _(u'Document'), source = CustomerDocumentSource(), required = False, ) class IPCNLicenseContractProcess(IPCNLicenseContract): """Interface for processing contract data. """ product_options = schema.List( title = _(u'Options/Fees'), value_type = ProductOptionField(), required = False, readonly = False, default = [], ) class IPCNLicenseContractEdit(IPCNLicenseContract): """Interface for editing sample contract data by customers. """ product_object = schema.Choice( title = _(u'Product'), source = ConCatProductSource(), required = True, ) document_object = schema.Choice( title = _(u'Document'), source = CustomerDocumentSource(), required = True, )