From dfdba7709840a58c29a842831474d87839671cd6 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Tue, 18 Sep 2018 14:35:50 +0200 Subject: [PATCH] [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. --- addons/hr_recruitment/models/hr_recruitment.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hr_recruitment/models/hr_recruitment.py b/addons/hr_recruitment/models/hr_recruitment.py index dc7196abab5..def453578c4 100644 --- a/addons/hr_recruitment/models/hr_recruitment.py +++ b/addons/hr_recruitment/models/hr_recruitment.py @@ -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