[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.
This commit is contained in:
Tony 2014-09-24 10:59:43 +08:00 committed by Martin Trigaux
parent bcf3bca87b
commit 64851ae8fe
1 changed files with 2 additions and 1 deletions

View File

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