Changeset 8708 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 13 Jun 2012, 13:29:35 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py
r8703 r8708 137 137 138 138 @property 139 def payee(self): 139 def display_fullname(self): 140 "Name of payee." 140 141 return self.context.getStudent().display_fullname 142 143 @property 144 def id(self): 145 "Id of payee" 146 return self.context.getStudent().student_id 147 148 @property 149 def faculty(self): 150 "Faculty of payee" 151 return self.context.getStudent().faccode 152 153 @property 154 def department(self): 155 "Department of payee" 156 return self.context.getStudent().depcode 141 157 142 158 # Student online payments must be importable. So we might need a factory. -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r8703 r8708 159 159 self.certificate.school_fee_1 = 40000.0 160 160 self.certificate.school_fee_2 = 20000.0 161 self.app['faculties']['fac1'] = Faculty( )161 self.app['faculties']['fac1'] = Faculty(code='fac1') 162 162 self.app['faculties']['fac1']['dep1'] = Department(code='dep1') 163 163 self.app['faculties']['fac1']['dep1'].certificates.addCertificate( … … 1475 1475 1476 1476 # Student is the payee of the payment ticket. 1477 self.assertEqual(IPaymentWebservice( 1478 self.student['payments'][value]).payee, 'Anna Tester') 1477 webservice = IPaymentWebservice(self.student['payments'][value]) 1478 self.assertEqual(webservice.display_fullname, 'Anna Tester') 1479 self.assertEqual(webservice.id, self.student_id) 1480 self.assertEqual(webservice.faculty, 'fac1') 1481 self.assertEqual(webservice.department, 'dep1') 1479 1482 1480 1483 # We simulate the approval -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r8688 r8708 225 225 """ 226 226 grok.implements(IStudentsUtils) 227 paymentfactory = u'waeup.StudentOnlinePayment'228 227 229 228 def getReturningData(self, student): … … 305 304 ticket.p_session == p_session: 306 305 return _('This type of payment has already been made.'), None 307 payment = createObject( self.paymentfactory)306 payment = createObject(u'waeup.StudentOnlinePayment') 308 307 timestamp = "%d" % int(time()*1000) 309 308 payment.p_id = "p%s" % timestamp
Note: See TracChangeset for help on using the changeset viewer.