[IMP] hire employee to open employee form
bzr revid: fp@tinyerp.com-20111117105301-6dwnjpqnbj7m5yof
This commit is contained in:
parent
893d7a655b
commit
666922776e
|
@ -440,7 +440,18 @@ class hr_applicant(crm.crm_case, osv.osv):
|
|||
})
|
||||
else:
|
||||
raise osv.except_osv(_('Warning!'),_('You must define Applied Job for Applicant !'))
|
||||
return self.case_close(cr, uid, ids, *args)
|
||||
self.case_close(cr, uid, ids, *args)
|
||||
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
act = mod_obj.get_object_reference(cr, uid, 'hr', 'open_view_employee_list')
|
||||
|
||||
act_obj = self.pool.get('ir.actions.act_window')
|
||||
act_win = act_obj.read(cr, uid, act[1], [])
|
||||
|
||||
act_win['domain'] = [('id','=',emp_id)]
|
||||
act_win['view_mode'] = 'form,tree'
|
||||
act_win['res_id'] = emp_id
|
||||
return act_win
|
||||
|
||||
def case_reset(self, cr, uid, ids, *args):
|
||||
"""Resets case as draft
|
||||
|
|
|
@ -48,8 +48,7 @@ class hired_employee(osv.osv_memory):
|
|||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', []))
|
||||
return {}
|
||||
return self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', []))
|
||||
|
||||
hired_employee()
|
||||
|
||||
|
|
Loading…
Reference in New Issue