diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index e85add4fed7..0aef0e45505 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -344,7 +344,7 @@
-
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 13e26e4ab10..db895767ec7 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -471,8 +471,11 @@ class hr_job(osv.osv): def _get_attached_docs(self, cr, uid, ids, field_name, arg, context=None): """Calculate total attached CV per job""" + res = {} attachment_obj = self.pool.get('ir.attachment') - res = {id: attachment_obj.search(cr, uid, [('res_model', '=', 'hr.job'), ('res_id', '=', id)], count=True, context=context) for id in ids} + for job_id in ids: + res_ids = [job_id] + self.pool.get('hr.applicant').search(cr, uid, [('job_id', '=', job_id)], context=context) + res[job_id] = attachment_obj.search(cr, uid, [('res_model', 'in', ['hr.job', 'hr.applicant']), ('res_id', 'in', res_ids)], count=True, context=context) return res _columns = { @@ -523,7 +526,8 @@ class hr_job(osv.osv): } def attachment_tree_view(self, cr, uid, ids, context): - domain = ['&', ('res_model', '=', 'hr.job'), ('res_id', 'in', ids)] + res_ids = ids + self.pool.get('hr.applicant').search(cr, uid, [('job_id', 'in', ids)], context=context) + domain = ['&', ('res_model', 'in', ['hr.job', 'hr.applicant']), ('res_id', 'in', res_ids)] res_id = ids and ids[0] or False return { 'name': _('Attachments'), diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 7bcb7024ef0..1efb2090a42 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -458,7 +458,7 @@ {'search_default_in_recruitment': 1}

- Click here to create a new job or remove the filter on "On Recruitment" to recruit for an on hold job. + Click here to create a new job or remove the filter on "In Recruitment" to recruit for an on hold job.

Define job position profile and manage recruitment in a context of a particular job: print interview survey, define number of expected new employees, and manage its recruitment pipe