[FIX] hr_recruitment: Open employee form when created from application

Currently, when clicking on 'Create Employee' on the application form,
the employee is correctly created but the form view that is opened
is for a new employee, not the employee that has been created on the fly.
This commit is contained in:
Yannick Tivisse
2018-09-19 16:11:51 +02:00
parent b9ad03ab78
commit dfdba77098
@@ -452,6 +452,7 @@ class Applicant(models.Model):
employee_action = self.env.ref('hr.open_view_employee_list')
dict_act_window = employee_action.read([])[0]
dict_act_window['context'] = {'form_view_initial_mode': 'edit'}
dict_act_window['res_id'] = employee.id
return dict_act_window
@api.multi