Ignore:
Timestamp:
21 Dec 2006, 16:19:39 (18 years ago)
Author:
joachim
Message:

reserve accommodation now respects special cases, change_bed moves wrong assigned students to the right bed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_accommodation/change_bed.py

    r1104 r1117  
    3838                                                  r.bed_type,
    3939                                                  info['student_status']))
    40     to_modify.append((r.bed,r.student,info['student_status']))
    41    
    42 for former_bed, student, status in to_modify:
     40    to_modify.append((r.bed,r.student,info['student_status'],info['acco_doc']))
     41for former_bed, student, status,acco_doc in to_modify:
    4342    beds.modifyRecord(bed=former_bed,student='')
    4443    code,bed = beds.searchAndReserveBed(student,status)
    4544    if code > 0:
     45        #from Products.zdb import set_trace; set_trace()
    4646        d = {}
    4747        d['bed'] = bed
     
    5050        d['acco_maint_code'] = acco_info.get('maintenance_code')
    5151        d['acco_maint_fee'] = acco_info.get('maintenance_fee')
    52         info['acco_doc'].edit(mapping=d)
    53         list.append("Student %s new bed %s assigned code = %s" % (r.student,
     52        acco_doc.edit(mapping=d)
     53        list.append("Student %s new bed %s assigned code = %s" % (student,
    5454                                                              bed,
    5555                                                              code))
Note: See TracChangeset for help on using the changeset viewer.