summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2016-08-23 11:05:59 +0200
committerGoffin Simon <sig@odoo.com>2016-08-23 14:10:08 +0200
commit0b80da48b5d34ecf4e4d7136e66e429721868589 (patch)
tree98420dd6205586ccdfb444f789fa89c0f6ff1447
parent2ab7d92c82f152bcbbde6edeab199b4276f0a55f (diff)
[FIX] hr_recruitment: Missing stage with department
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
-rw-r--r--addons/hr_recruitment/hr_recruitment.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 7124ec4f283..26ea7e18cfc 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -168,6 +168,8 @@ class hr_applicant(osv.Model):
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):