'Record creation post-processing
If the job title is the main, set the
human_resource.job_title_id accordingly'

@staticmethod
def hrm_job_title_human_resource_onaccept(form):

    vars = form.vars
    if vars.main:
        db = current.db
        ltable = db.hrm_job_title_human_resource
        record = db((ltable.id == vars.id)).select(ltable.human_resource_id, ltable.job_title_id, limitby=(0, 1)).first()
        htable = db.hrm_human_resource
        db((htable.id == record.human_resource_id)).update(job_title_id=record.job_title_id)
