source: main/waeup.custom/trunk/src/waeup/custom/interfaces.py @ 6948

Last change on this file since 6948 was 6923, checked in by Henrik Bettermann, 13 years ago

Customize SessionConfiguration? class.

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1##
2## interfaces.py
3from zope import schema
4from waeup.sirp.interfaces import IWAeUPObject, academic_sessions_vocab
5
6class ISessionConfiguration(IWAeUPObject):
7    """A session configuration object.
8    """
9
10    academic_session = schema.Choice(
11        title = u'Academic Session',
12        source = academic_sessions_vocab,
13        default = None,
14        required = True,
15        readonly = True
16        )
17
18    fee_1 = schema.Int(
19        title = u'School Fee',
20        default = 0,
21        )
22
23    surcharge_1 = schema.Int(
24        title = u'Surcharge BT',
25        default = 0,
26        )
27
28    surcharge_2 = schema.Int(
29        title = u'Surcharge Interswitch',
30        default = 0,
31        )
32
33    gown = schema.Int(
34        title = u'Gown Fee',
35        default = 0,
36        )
37
38    transfer = schema.Int(
39        title = u'Transfer Fee',
40        default = 0,
41        )
42
43    hostelmaintenance = schema.Int(
44        title = u'Hostel Maintenance Fee',
45        default = 0,
46        )
47
48    def getSessionString():
49        """Returns the session string from the vocabulary.
50        """
51
52
53class ISessionConfigurationAdd(ISessionConfiguration):
54    """A session configuration object in add mode.
55    """
56
57    academic_session = schema.Choice(
58        title = u'Academic Session',
59        source = academic_sessions_vocab,
60        default = None,
61        required = True,
62        readonly = False,
63        )
64
65ISessionConfigurationAdd['academic_session'].order =  ISessionConfiguration[
66    'academic_session'].order
Note: See TracBrowser for help on using the repository browser.