diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index ba88bc70305..23eeb4a5793 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -455,8 +455,8 @@ class hr_job(osv.osv): res = {} attachment_obj = self.pool.get('ir.attachment') 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) + applicant_ids = self.pool.get('hr.applicant').search(cr, uid, [('job_id', '=', job_id)], context=context) + res[job_id] = attachment_obj.search(cr, uid, ['|', '&',('res_model', '=', 'hr.job'), ('res_id', '=', job_id), '&',('res_model', '=', 'hr.applicant'), ('res_id', 'in', applicant_ids)], count=True, context=context) return res _columns = { @@ -512,8 +512,8 @@ class hr_job(osv.osv): } def attachment_tree_view(self, cr, uid, ids, context): - 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)] + applicant_ids = self.pool.get('hr.applicant').search(cr, uid, [('job_id', 'in', ids)], context=context) + domain = ['|', '&', ('res_model', '=', 'hr.job'), ('res_id', 'in', ids), '&',('res_model', '=', 'hr.applicant'), ('res_id', 'in', applicant_ids)] res_id = ids and ids[0] or False return { 'name': _('Attachments'), diff --git a/addons/hr_recruitment/static/src/css/job_position.css b/addons/hr_recruitment/static/src/css/job_position.css index f734cb744f9..889783496ad 100644 --- a/addons/hr_recruitment/static/src/css/job_position.css +++ b/addons/hr_recruitment/static/src/css/job_position.css @@ -29,7 +29,7 @@ position: absolute; width: 24px; height: 24px; - margin-left: 308px; + margin-left: 295px; margin-top: -5px; } .openerp .oe_launch_recruitment{ @@ -41,7 +41,7 @@ .openerp div.oe_applications { position: absolute;; margin-top: 16px; - font-size: 16px; + font-size: 14px; } .openerp .oe_applications > a > span:hover{ margin: 4px 0; @@ -49,6 +49,7 @@ } .openerp .oe_name { font-size: 14px; + font-weight: bold; } .openerp .oe_manager_name { width: 135px; @@ -58,12 +59,12 @@ .openerp .oe_job_justgage { float: right; margin-top: -40px; - margin-right: -30px; + margin-right: -58px; width:200px; height:130px; } .openerp .oe_department { - width: 358px; + width: 350px; } .openerp .oe_new_recruitment { margin-top: 4px;