Changeset 3120


Ignore:
Timestamp:
6 Feb 2008, 19:58:33 (17 years ago)
Author:
Henrik Bettermann
Message:

self-healing function for none acco_maint_fee

This is still not the best solution because the cost attribute of the first HMU batch found is used in waeup_tool.getHallInfo.

Location:
WAeUP_SRP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/reserve_accommodation.py

    r3119 r3120  
    4646    validate = REQUEST.has_key("cpsdocument_edit_button")
    4747    if info['maintenance_paid']:
     48        if not info['acco_doc'].acco_maint_fee:
     49            d_update = {}
     50            hall_info = context.waeup_tool.getHallInfo(info['acco_doc'].bed)
     51            d_update['acco_maint_fee'] = hall_info.get('maintenance_fee')
     52            wftool.doActionFor(info['acco'],'reserve_bed')
     53            info['acco_doc'].edit(mapping=d_update)
     54            wftool.doActionFor(info['acco'],'pay_maintenance_fee')
    4855        return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url())
    4956    # elif info['online_payment']:
  • WAeUP_SRP/fceokene/profiles/default/workflows/waeup_student_accommodation_wf/definition.xml

    r1482 r3120  
    2323 <state state_id="maintenance_fee_paid" title="">
    2424  <exit-transition transition_id="remove"/>
     25  <exit-transition transition_id="reserve_bed"/>
    2526 </state>
    2627 <state state_id="removed" title="">
     
    2930             new_state="maintenance_fee_paid" trigger="USER"
    3031             before_script="" after_script="">
    31  
     32
    3233  <guard>
    3334  </guard>
     
    3637             new_state="removed" trigger="USER"
    3738             before_script="" after_script="">
    38  
     39
    3940  <guard>
    4041  </guard>
     
    4344             new_state="bed_reserved" trigger="USER"
    4445             before_script="" after_script="">
    45  
     46
    4647  <guard>
    4748  </guard>
Note: See TracChangeset for help on using the changeset viewer.