From 64851ae8fe1d10566abd3375840eba0d5066f010 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 24 Sep 2014 10:59:43 +0800 Subject: [PATCH] [FIX] survey: wrong record passed to action_survey_resent The method action_survey_resent expects a survey.user_input instead of a hr.evaluation.interview record. --- addons/hr_evaluation/hr_evaluation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index 068af5be0ee..5f6948d52e6 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -326,7 +326,8 @@ class hr_evaluation_interview(osv.Model): def survey_req_waiting_answer(self, cr, uid, ids, context=None): request_obj = self.pool.get('survey.user_input') for interview in self.browse(cr, uid, ids, context=context): - request_obj.action_survey_resent(cr, uid, [interview.id], context=context) + if interview.request_id: + request_obj.action_survey_resent(cr, uid, [interview.request_id.id], context=context) self.write(cr, uid, interview.id, {'state': 'waiting_answer'}, context=context) return True