## $Id: interfaces.py 14313 2016-12-06 07:46:48Z 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.aaue.interfaces import MessageFactory as _ class IAAUECustomer(ICustomer): """Representation of a customer. """ inst = schema.TextLine( title = _(u'Institution'), required = False, ) postal_address = schema.Text( title = _(u'Postal Address'), required = False, ) # Customer document interfaces class IAAUECustomerDocument(ICustomerDocument): """A customer document. """ # Customer contract interfaces class IAAUEContract(IContract): """A customer contract sample with document attached. """ document_object = schema.Choice( title = _(u'Document'), source = CustomerDocumentSource(), required = False, ) class IAAUEContractOfficialUse(IIkobaObject): """Interface for editing official use data. """ comment = schema.Text( title= _('Reason for rejection'), required = False, ) class IAAUEContractProcess(IAAUEContract, IAAUEContractOfficialUse): """Interface for processing contract data. """ product_options = schema.List( title = _(u'Options/Fees'), value_type = ProductOptionField(), required = False, readonly = False, default = [], ) class IAAUEContractEdit(IAAUEContract): """Interface for editing sample contract data by customers. """ document_object = schema.Choice( title = _(u'Document'), source = CustomerDocumentSource(), required = True, )