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

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

Add customer fields.

  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1## $Id: interfaces.py 14313 2016-12-06 07:46:48Z 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    inst = schema.TextLine(
35        title = _(u'Institution'),
36        required = False,
37        )
38
39    postal_address = schema.Text(
40        title = _(u'Postal Address'),
41        required = False,
42        )
43
44# Customer document interfaces
45
46
47class IAAUECustomerDocument(ICustomerDocument):
48    """A customer document.
49
50    """
51
52# Customer contract interfaces
53
54class IAAUEContract(IContract):
55    """A customer contract sample with document attached.
56
57    """
58
59    document_object = schema.Choice(
60        title = _(u'Document'),
61        source = CustomerDocumentSource(),
62        required = False,
63        )
64
65class IAAUEContractOfficialUse(IIkobaObject):
66    """Interface for editing official use data.
67
68    """
69
70    comment = schema.Text(
71        title= _('Reason for rejection'),
72        required = False,
73        )
74
75class IAAUEContractProcess(IAAUEContract, IAAUEContractOfficialUse):
76    """Interface for processing contract data.
77    """
78
79    product_options = schema.List(
80        title = _(u'Options/Fees'),
81        value_type = ProductOptionField(),
82        required = False,
83        readonly = False,
84        default = [],
85        )
86
87class IAAUEContractEdit(IAAUEContract):
88    """Interface for editing sample contract data by customers.
89
90    """
91
92    document_object = schema.Choice(
93        title = _(u'Document'),
94        source = CustomerDocumentSource(),
95        required = True,
96        )
Note: See TracBrowser for help on using the repository browser.