1 | ## $Id: refereereport.py 13975 2016-06-22 16:55:37Z henrik $ |
---|
2 | ## |
---|
3 | ## Copyright (C) 2016 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 | import os |
---|
19 | import grok |
---|
20 | from datetime import datetime |
---|
21 | from zope.component import getUtility, createObject, getAdapter |
---|
22 | from zope.component.interfaces import IFactory |
---|
23 | from zope.event import notify |
---|
24 | from zope.securitypolicy.interfaces import IPrincipalRoleManager |
---|
25 | from zope.interface import implementedBy |
---|
26 | from zope.schema.interfaces import RequiredMissing, ConstraintNotSatisfied |
---|
27 | from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState |
---|
28 | from waeup.kofa.interfaces import IKofaUtils |
---|
29 | from waeup.kofa.interfaces import MessageFactory as _ |
---|
30 | from waeup.kofa.utils.helpers import attrs_to_fields |
---|
31 | from waeup.kofa.applicants.interfaces import IApplicantRefereeReport |
---|
32 | |
---|
33 | |
---|
34 | class ApplicantRefereeReport(grok.Model): |
---|
35 | """This is referee report. |
---|
36 | """ |
---|
37 | grok.implements(IApplicantRefereeReport) |
---|
38 | grok.provides(IApplicantRefereeReport) |
---|
39 | |
---|
40 | def __init__(self): |
---|
41 | super(ApplicantRefereeReport, self).__init__() |
---|
42 | self.r_id = None |
---|
43 | self.creation_date = datetime.utcnow() |
---|
44 | return |
---|
45 | |
---|
46 | ApplicantRefereeReport = attrs_to_fields(ApplicantRefereeReport) |
---|
47 | |
---|
48 | |
---|
49 | class ApplicantRefereeReportFactory(grok.GlobalUtility): |
---|
50 | """A factory for applicant online payments. |
---|
51 | """ |
---|
52 | grok.implements(IFactory) |
---|
53 | grok.name(u'waeup.ApplicantRefereeReport') |
---|
54 | title = u"Create a new referee report.", |
---|
55 | description = u"This factory instantiates new referee report instances." |
---|
56 | |
---|
57 | def __call__(self, *args, **kw): |
---|
58 | return ApplicantRefereeReport() |
---|
59 | |
---|
60 | def getInterfaces(self): |
---|
61 | return implementedBy(ApplicantRefereeReport) |
---|