Skip to content

Commit

Permalink
[FIX] hr_recruitment: Missing stage with department
Browse files Browse the repository at this point in the history
When 'search_default_job_id' is in the context, the department set for
this job must be used to filter the right stages(_read_group_stage_ids).

opw:685896
  • Loading branch information
simongoffin committed Aug 23, 2016
1 parent 2ab7d92 commit 0b80da4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/hr_recruitment/hr_recruitment.py
Expand Up @@ -168,6 +168,8 @@ def _resolve_department_id_from_context(self, cr, uid, context=None):
department_ids = self.pool.get('hr.department').name_search(cr, uid, name=department_name, context=context)
if len(department_ids) == 1:
return int(department_ids[0][0])
if context.get('search_default_job_id'):
return self.pool['hr.job'].browse(cr, uid, context.get('search_default_job_id'))[0].department_id.id
return None

def _get_default_company_id(self, cr, uid, department_id=None, context=None):
Expand Down

0 comments on commit 0b80da4

Please sign in to comment.