source: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/interfaces.py @ 14184

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

Further customizations.

  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1## $Id: interfaces.py 14184 2016-09-23 16:38:53Z 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, ICustomerPDFDocument, IContract)
23from waeup.ikoba.customers.vocabularies import (
24    ConCatProductSource, CustomerDocumentSource)
25from waeup.ikoba.products.productoptions import ProductOptionField
26from ikobacustom.uniben.interfaces import MessageFactory as _
27
28
29class IUnibenCustomer(ICustomer):
30    """Representation of a customer.
31
32    """
33
34# Customer document interfaces
35
36
37class IUnibenCustomerDocument(ICustomerDocument):
38    """A customer document.
39
40    """
41
42class IUnibenCustomerPDFDocument(ICustomerPDFDocument):
43    """A customer pdf document.
44
45    """
46
47# Customer contract interfaces
48
49class IUnibenContract(IContract):
50    """A customer contract sample with document attached.
51
52    """
53
54    document_object = schema.Choice(
55        title = _(u'Document'),
56        source = CustomerDocumentSource(),
57        required = False,
58        )
59
60    document_object2 = schema.Choice(
61        title = _(u'Document 2'),
62        source = CustomerDocumentSource(),
63        required = False,
64        )
65
66class IRIAAContract(IUnibenContract):
67    """A Retention of Name contract.
68
69    """
70
71class IRIAAContractOfficialUse(IIkobaObject):
72    """Interface for editing RIAA official use data.
73
74    """
75
76    comment = schema.Text(
77        title= _('Reason for rejection'),
78        required = False,
79        )
80
81
82class IRIAAContractProcess(IRIAAContract, IRIAAContractOfficialUse):
83    """Interface for processing RIAA data.
84    """
85
86    product_options = schema.List(
87        title = _(u'Options/Fees'),
88        value_type = ProductOptionField(),
89        required = False,
90        readonly = False,
91        defaultFactory=list,
92        )
93
94class IRIAAContractEdit(IRIAAContract):
95    """Interface for editing RIAA data by customers.
96
97    """
98
99    document_object = schema.Choice(
100        title = _(u'Document'),
101        source = CustomerDocumentSource(),
102        required = True,
103        )
104
105    document_object2 = schema.Choice(
106        title = _(u'Document 2'),
107        source = CustomerDocumentSource(),
108        required = True,
109        )
Note: See TracBrowser for help on using the repository browser.