Ignore:
Timestamp:
10 Oct 2006, 16:31:30 (18 years ago)
Author:
joachim
Message:

added hostal_reservation_slip

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  
    1919student = info['student']
    2020if info['acco']:
    21     return student.hostal_reservation_slip()
     21    return context.REQUEST.RESPONSE.redirect("%s" % info['acco'].absolute_url())
    2222res,psm,ds = lt.renderLayout(layout_id= 'student_acco_reserve',
    2323                      schema_id= 'student_acco_reserve',
     
    4747    s_id = ds.get('s_id')
    4848    pin = str(ds.get('acco_res_ac_pin'))
     49   
    4950    pa = context.portal_accommodation
    5051    code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
    51     if code < -10:
     52    if code < 0:
    5253        return context.reserve_acco_form(rendered = res,
    5354                                 psm = bed,
     
    5859student.invokeFactory('StudentAccommodation',acco_id)
    5960acco = getattr(student,acco_id)
    60 ds['acco_res_date'] = current
    61 ds['bed'] = bed
    62 ds['session'] = session
     61ds.set('acco_res_date', current)
     62ds.set('bed', bed)
     63ds.set('session', session)
    6364acco.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                                  )
     65return 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##                                 )
    7172
Note: See TracChangeset for help on using the changeset viewer.