summaryrefslogtreecommitdiff
path: root/addons/hr_evaluation/wizard
diff options
context:
space:
mode:
authorYSA (Openerp) <ysa@tinyerp.com>2011-02-04 11:48:19 +0530
committerYSA (Openerp) <ysa@tinyerp.com>2011-02-04 11:48:19 +0530
commitbbdac458fdbd5ece78fc674767177f91b045e4bc (patch)
treee6d019dc4d5d638435b34f492c891f41bb1bd9e9 /addons/hr_evaluation/wizard
parente9e229568be13dbc9d56f3057e81de7824ff6aec (diff)
[IMP] call email_send method of email.message object insted of tools.
bzr revid: ysa@tinyerp.com-20110204061819-bb3p94bs7og680je
Diffstat (limited to 'addons/hr_evaluation/wizard')
-rw-r--r--addons/hr_evaluation/wizard/hr_evaluation_mail.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/hr_evaluation/wizard/hr_evaluation_mail.py b/addons/hr_evaluation/wizard/hr_evaluation_mail.py
index 17ad7415cb5..c9f2ac15c54 100644
--- a/addons/hr_evaluation/wizard/hr_evaluation_mail.py
+++ b/addons/hr_evaluation/wizard/hr_evaluation_mail.py
@@ -29,13 +29,14 @@ class hr_evaluation_reminder(osv.osv_memory):
}
def send_mail(self, cr, uid, ids, context=None):
+ email_message_obj = self.pool.get('email.message')
hr_evaluation_interview_obj = self.pool.get('hr.evaluation.interview')
evaluation_data = self.read(cr, uid, ids, context=context)[0]
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)
+ email_message_obj.email_send(tools.config['email_from'], [current_interview.user_to_review_id.work_email],\
+ 'Reminder to fill up Survey', msg, model='hr.evaluation.reminder')
return {'type': 'ir.actions.act_window_close'}
hr_evaluation_reminder()