1 | ## $Id: refereereport.py 16243 2020-09-23 19:42:07Z 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 | self.email = None |
---|
45 | return |
---|
46 | |
---|
47 | ApplicantRefereeReport = attrs_to_fields(ApplicantRefereeReport) |
---|
48 | |
---|
49 | |
---|
50 | class ApplicantRefereeReportFactory(grok.GlobalUtility): |
---|
51 | """A factory for applicant online payments. |
---|
52 | """ |
---|
53 | grok.implements(IFactory) |
---|
54 | grok.name(u'waeup.ApplicantRefereeReport') |
---|
55 | title = u"Create a new referee report.", |
---|
56 | description = u"This factory instantiates new referee report instances." |
---|
57 | |
---|
58 | def __call__(self, *args, **kw): |
---|
59 | return ApplicantRefereeReport() |
---|
60 | |
---|
61 | def getInterfaces(self): |
---|
62 | return implementedBy(ApplicantRefereeReport) |
---|