Changeset 15513 for main/kofacustom.dspg/trunk/src
- Timestamp:
- 24 Jul 2019, 20:33:11 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/export.py
r15186 r15513 19 19 """ 20 20 import grok 21 from waeup.kofa.applicants.interfaces import IApplicantBaseData 21 from waeup.kofa.applicants.interfaces import ( 22 IApplicantBaseData, IApplicantOnlinePayment) 22 23 from waeup.kofa.utils.helpers import iface_names 24 from waeup.kofa.applicants.export import ApplicantPaymentExporter 23 25 from kofacustom.nigeria.applicants.export import NigeriaApplicantExporter 24 26 from kofacustom.nigeria.applicants.interfaces import ( … … 41 43 'password', 'state', 'history', 'container_code', 'application_number', 42 44 'display_fullname', 'application_date') 45 46 class CustomApplicantPaymentExporter(ApplicantPaymentExporter): 47 """ 48 """ 49 fields = tuple(sorted(iface_names( 50 IApplicantOnlinePayment, 51 exclude_attribs=False, 52 omit=['display_item']))) + ( 53 'applicant_id', 54 'reg_number', 55 'display_fullname', 56 'course1', 57 'course2') 58 59 def mangle_value(self, value, name, context=None): 60 """ 61 """ 62 if name in ('applicant_id', 'reg_number', 63 'display_fullname', 'course1', 'course2') and context is not None: 64 applicant = context.__parent__ 65 value = getattr(applicant, name, None) 66 return super( 67 CustomApplicantPaymentExporter, self).mangle_value( 68 value, name, context=context)
Note: See TracChangeset for help on using the changeset viewer.