Ignore:
Timestamp:
31 May 2016, 17:57:03 (8 years ago)
Author:
Henrik Bettermann
Message:

Make some adjustments to payment exporters and importers: Do not allow to import display_item, use IPayer adapter, fix docstring and more.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py

    r13024 r13871  
    4545    IStudentStudyLevel, ICourseTicketImport,
    4646    IStudentOnlinePayment, IStudentVerdictUpdate)
     47from waeup.kofa.payments.interfaces import IPayer
    4748from waeup.kofa.students.workflow import  (
    4849    IMPORTABLE_STATES, IMPORTABLE_TRANSITIONS,
     
    735736
    736737class StudentOnlinePaymentProcessor(StudentProcessorBase):
    737     """The Course Ticket Processor imports student payment tickets. The
    738     tickets are located in the ``payments`` subfolder of the student
     738    """The Student Online Payment Processor imports student payment tickets.
     739    The tickets are located in the ``payments`` subfolder of the student
    739740    container. The only additional locator is `p_id`, the object id.
    740741
     
    759760
    760761    additional_fields = ['p_id']
     762
     763    @property
     764    def available_fields(self):
     765        af = super(
     766            StudentOnlinePaymentProcessor, self).available_fields
     767        af.remove('display_item')
     768        return af
    761769
    762770    def checkHeaders(self, headerfields, mode='ignore'):
     
    875883            results = list(cat.searchResults(p_id=(p_id, p_id)))
    876884            if len(results) > 0:
    877                 sids = [payment.student.student_id for payment in results]
     885                sids = [IPayer(payment).id for payment in results]
    878886                sids_string = ''
    879887                for id in sids:
Note: See TracChangeset for help on using the changeset viewer.