[FIX] hr_evaluations -> Evaluation Reminders Wizard Send Mail

bzr revid: jam@tinyerp.com-20101014112928-502jadzmxvf24nrq
This commit is contained in:
jam-openerp 2010-10-14 16:59:28 +05:30
parent a0caf55b9f
commit 816dc0de90
1 changed files with 5 additions and 5 deletions

View File

@ -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'}