source: main/waeup.kofa/branches/uli-rm-bootstrap/src/waeup/kofa/applicants/refereereport.py @ 17952

Last change on this file since 17952 was 13975, checked in by Henrik Bettermann, 8 years ago

Add creation_date attribute.

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
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##
18import os
19import grok
20from datetime import datetime
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
43        self.creation_date = datetime.utcnow()
44        return
45
46ApplicantRefereeReport = attrs_to_fields(ApplicantRefereeReport)
47
48
49class 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)
Note: See TracBrowser for help on using the repository browser.