Changeset 8712


Ignore:
Timestamp:
13 Jun 2012, 14:00:52 (12 years ago)
Author:
Henrik Bettermann
Message:

Payment factory name is waeup.StudentOnlinePayment?, otherwise regular payment objects instead of custom objects are created during import.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py

    r8677 r8712  
    3636    ('Other Certification','oc'),
    3737    ('Higher National Diploma','hnd'),
     38    ('Post Graduate Diploma','pgd'),
    3839    ('NCE AL OTH','nce_al_oth'),
    3940    ('National Defence Academy','nda'),
  • main/waeup.aaue/trunk/src/waeup/aaue/students/payments.py

    r8444 r8712  
    2323from zope.interface import implementedBy
    2424from waeup.kofa.students.interfaces import IStudentNavigation
    25 from waeup.kofa.students.payments import StudentOnlinePayment
     25from waeup.kofa.students.payments import (
     26    StudentOnlinePayment, StudentOnlinePaymentFactory)
    2627from waeup.kofa.utils.helpers import attrs_to_fields
    2728from waeup.aaue.students.interfaces import ICustomStudentOnlinePayment
     
    4748CustomStudentOnlinePayment = attrs_to_fields(CustomStudentOnlinePayment)
    4849
    49 # Student online payments must be importable. So we might need a factory.
    50 class CustomStudentOnlinePaymentFactory(grok.GlobalUtility):
     50class CustomStudentOnlinePaymentFactory(StudentOnlinePaymentFactory):
    5151    """A factory for student online payments.
    5252    """
    53     grok.implements(IFactory)
    54     grok.name(u'waeup.CustomStudentOnlinePayment')
    55     title = u"Create a new online payment.",
    56     description = u"This factory instantiates new online payment instances."
    5753
    5854    def __call__(self, *args, **kw):
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r8677 r8712  
    3030    """
    3131    grok.implements(IStudentsUtils)
    32 
    33     paymentfactory = u'waeup.CustomStudentOnlinePayment'
    3432
    3533    def getReturningData(self, student):
     
    121119               ticket.p_session == p_session:
    122120                  return _('This type of payment has already been made.'), None
    123         payment = createObject(self.paymentfactory)
     121        payment = createObject(u'waeup.StudentOnlinePayment')
    124122        timestamp = "%d" % int(time()*1000)
    125123        payment.p_id = "p%s" % timestamp
Note: See TracChangeset for help on using the changeset viewer.