Changeset 16067


Ignore:
Timestamp:
21 Apr 2020, 08:15:24 (5 years ago)
Author:
Henrik Bettermann
Message:

Customize ApplicantRefereeReportExporter?.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/applicant.py

    r16062 r16067  
    3636    grok.provides(ICustomApplicant)
    3737
     38    @property
     39    def refereereports(self):
     40        reports = [value for value in self.values()
     41            if isinstance(value, CustomApplicantRefereeReport)]
     42        return reports
     43
    3844CustomApplicant = attrs_to_fields(CustomApplicant)
    3945
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/export.py

    r15563 r16067  
    2121from waeup.kofa.applicants.interfaces import IApplicantBaseData
    2222from waeup.kofa.utils.helpers import iface_names
     23from waeup.kofa.applicants.export import ApplicantRefereeReportExporter
    2324from kofacustom.nigeria.applicants.export import NigeriaApplicantExporter
    2425from kofacustom.nigeria.applicants.interfaces import (
    2526    INigeriaUGApplicant, INigeriaPGApplicant)
    2627from kofacustom.iuokada.applicants.interfaces import (
    27     ICustomUGApplicant, ICustomPGApplicant)
     28    ICustomUGApplicant, ICustomPGApplicant,
     29    ICustomApplicantRefereeReport)
    2830
    2931class CustomApplicantExporter(NigeriaApplicantExporter):
     
    4042        'password', 'state', 'history', 'container_code', 'application_number',
    4143        'display_fullname', 'application_date')
     44
     45class CustomApplicantRefereeReportExporter(ApplicantRefereeReportExporter):
     46
     47    fields = tuple(sorted(iface_names(
     48        ICustomApplicantRefereeReport,
     49        exclude_attribs=False))) + (
     50              'applicant_id',
     51              'reg_number',
     52              'display_fullname',)
Note: See TracChangeset for help on using the changeset viewer.