[IMP]:when not get email from config file then take the email from the view
authorksa (OpenERP) <ksa@tinyerp.com>
Wed, 7 Mar 2012 09:47:13 +0000 (15:17 +0530)
committerksa (OpenERP) <ksa@tinyerp.com>
Wed, 7 Mar 2012 09:47:13 +0000 (15:17 +0530)
bzr revid: ksa@tinyerp.com-20120307094713-iown9rbyqqx7cfx4

addons/hr_evaluation/wizard/hr_evaluation_mail.py

index 84c030d..2705321 100644 (file)
@@ -34,7 +34,7 @@ class hr_evaluation_reminder(osv.osv_memory):
         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(current_interview.user_id.user_email or tools.config['email_from'], [current_interview.user_to_review_id.work_email],\
+            tools.email_send(tools.config['email_from'] or current_interview.user_id.user_email, [current_interview.user_to_review_id.work_email],\
                                           'Reminder to fill up Survey', msg)
         return {'type': 'ir.actions.act_window_close'}