[FIX] hr_recruitment: Fix traceback on applicant quick create
Currently, when got to applicant view and quick create the applicant in the kanban view there is traceback for department_id. becasue department_id is computed field which depends on job_id and it was not set as False due to filter on self. So in this commit, If job_id is not there then department_id should be set as False. closes odoo/odoo#56796 Taskid: 2320885 X-original-commit: 2ec35b724e5ac985a4baef85b96dc3411a828762 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
committed by
Barad Mahendra
parent
0e8d2f4f15
commit
8d1918d82c
@@ -230,7 +230,7 @@ class Applicant(models.Model):
|
||||
|
||||
@api.depends('job_id')
|
||||
def _compute_department(self):
|
||||
for applicant in self.filtered(lambda a: a.job_id):
|
||||
for applicant in self:
|
||||
applicant.department_id = applicant.job_id.department_id.id
|
||||
|
||||
@api.depends('job_id')
|
||||
|
||||
Reference in New Issue
Block a user