Changeset 1100
- Timestamp:
- 20 Dec 2006, 09:23:40 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py
r952 r1100 2 2 # $Id$ 3 3 """ 4 process the Application Form 5 return html renderer + psm 4 process the the accommodation reservation 6 5 """ 7 6 import DateTime 8 9 7 current = DateTime.DateTime() 10 8 pr = context.portal_registration 11 9 wftool = context.portal_workflow 12 13 info = context.getStudentInfo()14 validate = REQUEST.has_key("cpsdocument_create_button")15 # REQUEST.has_key("cpsdocument_edit_button")16 17 10 lt = context.portal_layouts 18 pr = context.portal_registration 19 session = current.year() 20 acco_id = 'accommodation_%s' % session 21 info = context.getStudentInfo() 11 info = context.getAccommodationInfo() 22 12 student = info['student'] 13 acco_id = info['acco_id'] 14 session = acco_id[-4:] 23 15 mode = 'create' 24 25 16 if info['review_state'] != 'cleared_and_validated': 26 17 return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url()) 27 18 validate = REQUEST.has_key("cpsdocument_create_button") 28 19 if info.has_key('acco') and info['acco']: 29 20 validate = REQUEST.has_key("cpsdocument_edit_button") … … 69 60 pin = str(ds.get('acco_res_sc_pin')) 70 61 pa = context.portal_accommodation 71 code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status'))) 62 code,bed = pa.searchAndReserveBed(s_id,"%s" % (info['student_status'])) 63 #code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status'))) 72 64 if code < 0: 73 65 return context.accommodation_pin_edit_form(rendered = res, … … 84 76 ds.set('bed', bed) 85 77 ds.set('session', session) 78 ds.set('student_status',info['student_status']) 86 79 acco.getContent().edit(mapping=ds) 87 80 #wftool.doActionFor(acco,'pay_maintenance_fee',dest_container=acco)
Note: See TracChangeset for help on using the changeset viewer.