From 816dc0de90a3e970620d855ce35d9071ea23b358 Mon Sep 17 00:00:00 2001 From: jam-openerp Date: Thu, 14 Oct 2010 16:59:28 +0530 Subject: [PATCH] [FIX] hr_evaluations -> Evaluation Reminders Wizard Send Mail bzr revid: jam@tinyerp.com-20101014112928-502jadzmxvf24nrq --- addons/hr_evaluation/wizard/hr_evaluation_mail.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/hr_evaluation/wizard/hr_evaluation_mail.py b/addons/hr_evaluation/wizard/hr_evaluation_mail.py index 576c782bfd8..3464c4beaee 100644 --- a/addons/hr_evaluation/wizard/hr_evaluation_mail.py +++ b/addons/hr_evaluation/wizard/hr_evaluation_mail.py @@ -29,14 +29,14 @@ class hr_evaluation_reminder(osv.osv_memory): } def send_mail(self, cr, uid, ids, context=None): - hr_evaluation_obj = self.pool.get('hr_evaluation.evaluation') + hr_evaluation_interview_obj = self.pool.get('hr.evaluation.interview') if context is None: context = {} evaluation_data = self.read(cr, uid, ids, context=context)[0] - for waiting_id in hr_evaluation_obj.browse(cr, uid, evaluation_data['evaluation_id'], context=context).survey_request_ids: - if waiting_id.state == "waiting_answer" and waiting_id.user_to_review_id.work_email : - msg = " Hello %s, \n\n Kindly post your response for %s survey. \n\n Thanks," %(waiting_id.user_to_review_id.name, waiting_id.survey_id.title) - tools.email_send(tools.config['email_from'], [waiting_id.user_to_review_id.work_email],\ + current_interview = hr_evaluation_interview_obj.browse(cr, uid, evaluation_data.get('evaluation_id')) + if current_interview.state == "waiting_answer" and current_interview.user_to_review_id.work_email : + msg = " Hello %s, \n\n Kindly post your response for '%s' survey interview. \n\n Thanks," %(current_interview.user_to_review_id.name, current_interview.survey_id.title) + tools.email_send(tools.config['email_from'], [current_interview.user_to_review_id.work_email],\ 'Reminder to fill up Survey', msg) return {'type': 'ir.actions.act_window_close'}