From cd7fc8ccef913d32393ad13f5b149a5a1925b674 Mon Sep 17 00:00:00 2001 From: "Jignesh Rathod (OpenERP)" Date: Tue, 11 Jun 2013 16:30:08 +0530 Subject: [PATCH] Improve code. bzr revid: jir@tinyerp.com-20130611110008-m3ftw03gznv802ll --- addons/hr_recruitment/hr_recruitment.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index ead8264f663..09c238fcd86 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -206,11 +206,11 @@ class hr_applicant(base_stage, osv.Model): def _compute_attachments(self, cr, uid, ids, fields, args, context=None): res = {} attachment_pool = self.pool.get('ir.attachment') - for issue in self.browse(cr, uid, ids, context=context): - res[issue.id] = 0 - attach = attachment_pool.search(cr, uid, [('res_model','=','hr.applicant'),('res_id','=',issue.id)]) + for applicant in self.browse(cr, uid, ids, context=context): + res[applicant.id] = 0 + attach = attachment_pool.search(cr, uid, [('res_model','=','hr.applicant'),('res_id','=',applicant.id)]) if attach: - res[issue.id] = len(attach) + res[applicant.id] = len(attach) return res _columns = {