'Copy the request_type to the commitment'

@staticmethod
def commit_onvalidation(form):

    req_id = s3_get_last_record_id('req_req')
    if req_id:
        rtable = current.s3db.req_req
        query = (rtable.id == req_id)
        req_record = current.db(query).select(rtable.type, limitby=(0, 1)).first()
        if req_record:
            form.vars.type = req_record.type
