source: main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/interfaces.py @ 14312

Last change on this file since 14312 was 14310, checked in by Henrik Bettermann, 8 years ago

Renaming and port setting.

  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1## $Id: interfaces.py 14310 2016-12-05 09:14:32Z 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
19from zope import schema
20from waeup.ikoba.interfaces import IIkobaObject
21from waeup.ikoba.customers.interfaces import (
22    ICustomer, ICustomerDocument, IContract)
23from waeup.ikoba.customers.vocabularies import (
24    ConCatProductSource, CustomerDocumentSource)
25from waeup.ikoba.products.productoptions import ProductOptionField
26from ikobacustom.aaue.interfaces import MessageFactory as _
27
28
29class IAAUECustomer(ICustomer):
30    """Representation of a customer.
31
32    """
33
34# Customer document interfaces
35
36
37class IAAUECustomerDocument(ICustomerDocument):
38    """A customer document.
39
40    """
41
42# Customer contract interfaces
43
44class IAAUEContract(IContract):
45    """A customer contract sample with document attached.
46
47    """
48
49    document_object = schema.Choice(
50        title = _(u'Document'),
51        source = CustomerDocumentSource(),
52        required = False,
53        )
54
55class IAAUEContractOfficialUse(IIkobaObject):
56    """Interface for editing official use data.
57
58    """
59
60    comment = schema.Text(
61        title= _('Reason for rejection'),
62        required = False,
63        )
64
65class IAAUEContractProcess(IAAUEContract, IAAUEContractOfficialUse):
66    """Interface for processing contract data.
67    """
68
69    product_options = schema.List(
70        title = _(u'Options/Fees'),
71        value_type = ProductOptionField(),
72        required = False,
73        readonly = False,
74        default = [],
75        )
76
77class IAAUEContractEdit(IAAUEContract):
78    """Interface for editing sample contract data by customers.
79
80    """
81
82    document_object = schema.Choice(
83        title = _(u'Document'),
84        source = CustomerDocumentSource(),
85        required = True,
86        )
Note: See TracBrowser for help on using the repository browser.