Changeset 13314 for main/waeup.kofa/trunk
- Timestamp:
- 13 Oct 2015, 17:29:07 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py
r9987 r13314 81 81 return students_utils.getBedCoordinates(self) 82 82 83 @property 84 def maint_payment_made(self): 85 try: 86 if len(self.student['payments']): 87 for ticket in self.student['payments'].values(): 88 if ticket.p_category == 'hostel_maintenance' and \ 89 ticket.p_session == self.booking_session and \ 90 ticket.p_state == 'paid': 91 return True 92 except TypeError: # in unit tests 93 pass 94 return False 95 83 96 def writeLogMessage(self, view, message): 84 97 return self.__parent__.__parent__.writeLogMessage(view, message) -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r13281 r13314 445 445 sorted(iface_names( 446 446 IBedTicket, exclude_attribs=False, 447 omit=['display_coordinates' ]))) + (447 omit=['display_coordinates', 'maint_payment_made']))) + ( 448 448 'student_id', 'actual_bed_type') 449 449 title = _(u'Bed Tickets') -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r13167 r13314 705 705 """A representation of accommodation booking data. 706 706 """ 707 bed = Attribute('The bed object .')707 bed = Attribute('The bed object') 708 708 booking_date = Attribute('Date of booking the bed') 709 maint_payment_made = Attribute('True if maintenance payment is made') 709 710 710 711 display_coordinates = schema.TextLine( -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r13241 r13314 3090 3090 value = ctrl.options[1] 3091 3091 self.assertEqual(self.student['payments'][value].amount_auth, 987.0) 3092 # The bedticket is aware of successfull maintenance fee payment 3093 bedticket = self.student['accommodation']['2004'] 3094 self.assertFalse(bedticket.maint_payment_made) 3095 self.student['payments'][value].approve() 3096 self.assertTrue(bedticket.maint_payment_made) 3092 3097 return 3093 3098 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_student.py
r13002 r13314 140 140 return 141 141 142 def test_maint_payment_made(self): 143 self.assertFalse(self.bedticket.maint_payment_made) 144 return 145 146 142 147 class StudentRemovalTests(StudentImportExportSetup): 143 148 # Test handle_student_removed
Note: See TracChangeset for help on using the changeset viewer.