[FIX] hr_recruitement: correct search of default stage on applicants
This commit is contained in:
@@ -86,10 +86,12 @@ class Applicant(models.Model):
|
||||
|
||||
def _default_stage_id(self):
|
||||
if self._context.get('default_job_id'):
|
||||
return self.env['hr.recruitment.stage'].search([
|
||||
ids = self.env['hr.recruitment.stage'].search([
|
||||
('job_ids', '=', self._context['default_job_id']),
|
||||
('fold', '=', False)
|
||||
], order='sequence asc', limit=1).ids[0]
|
||||
], order='sequence asc', limit=1).ids
|
||||
if ids:
|
||||
return ids[0]
|
||||
return False
|
||||
|
||||
def _default_company_id(self):
|
||||
|
||||
Reference in New Issue
Block a user