[IMP] improved domain and UI

bzr revid: tpa@tinyerp.com-20131204102228-5bgm74hpxd3snkus
This commit is contained in:
Turkesh Patel (Open ERP)
2013-12-04 15:52:28 +05:30
parent 0ed4e99fb7
commit 9c2b009c9d
2 changed files with 9 additions and 8 deletions
+4 -4
View File
@@ -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'),
@@ -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;