source: main/waeup.kofa/trunk/src/waeup/kofa/applicants/refereereport.py @ 17860

Last change on this file since 17860 was 16243, checked in by Henrik Bettermann, 4 years ago

Save email address provided by mandate when referee report
is created. Add RefereeReportManageFormPage (no button available).

  • Property svn:keywords set to Id
File size: 2.3 KB
RevLine 
[13973]1## $Id: refereereport.py 16243 2020-09-23 19:42:07Z henrik $
[13972]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##
18import os
19import grok
[13975]20from datetime import datetime
[13972]21from zope.component import getUtility, createObject, getAdapter
22from zope.component.interfaces import IFactory
23from zope.event import notify
24from zope.securitypolicy.interfaces import IPrincipalRoleManager
25from zope.interface import implementedBy
26from zope.schema.interfaces import RequiredMissing, ConstraintNotSatisfied
27from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
28from waeup.kofa.interfaces import IKofaUtils
29from waeup.kofa.interfaces import MessageFactory as _
30from waeup.kofa.utils.helpers import attrs_to_fields
31from waeup.kofa.applicants.interfaces import IApplicantRefereeReport
32
33
34class 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
[13975]43        self.creation_date = datetime.utcnow()
[16243]44        self.email = None
[13972]45        return
46
47ApplicantRefereeReport = attrs_to_fields(ApplicantRefereeReport)
48
49
50class 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)
Note: See TracBrowser for help on using the repository browser.