source: main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/customers/interfaces.py @ 12399

Last change on this file since 12399 was 12335, checked in by Henrik Bettermann, 10 years ago

Adjust to changes made in base package.

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