Changeset 642 for WAeUP_SRP/trunk/skins/waeup_accommodation
- Timestamp:
- 10 Oct 2006, 16:31:30 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_accommodation
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py
r639 r642 19 19 student = info['student'] 20 20 if info['acco']: 21 return student.hostal_reservation_slip()21 return context.REQUEST.RESPONSE.redirect("%s" % info['acco'].absolute_url()) 22 22 res,psm,ds = lt.renderLayout(layout_id= 'student_acco_reserve', 23 23 schema_id= 'student_acco_reserve', … … 47 47 s_id = ds.get('s_id') 48 48 pin = str(ds.get('acco_res_ac_pin')) 49 49 50 pa = context.portal_accommodation 50 51 code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status'))) 51 if code < -10:52 if code < 0: 52 53 return context.reserve_acco_form(rendered = res, 53 54 psm = bed, … … 58 59 student.invokeFactory('StudentAccommodation',acco_id) 59 60 acco = getattr(student,acco_id) 60 ds ['acco_res_date'] = current61 ds ['bed'] = bed62 ds ['session'] = session61 ds.set('acco_res_date', current) 62 ds.set('bed', bed) 63 ds.set('session', session) 63 64 acco.getContent().edit(mapping=ds) 64 return student.hostal_reservation_slip()65 return context.reserve_acco_form(rendered = res,66 psm = "successfully reserved bed %s" % bed,67 firstlayout = True,68 lastlayout = True,69 ds = ds,70 )65 return context.REQUEST.RESPONSE.redirect("%s/hostal_reservation_slip" % student.absolute_url()) 66 ##return context.reserve_acco_form(rendered = res, 67 ## psm = "successfully reserved bed %s" % bed, 68 ## firstlayout = True, 69 ## lastlayout = True, 70 ## ds = ds, 71 ## ) 71 72
Note: See TracChangeset for help on using the changeset viewer.