From 972b02397af24512b653a63124760e120a051ee6 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 5 Feb 2015 17:31:32 +0100 Subject: [PATCH] [FIX] survey: write expects a list of integers for ids arg In saas-3, at rev. c7afc04be334d583510cfa66592397b8400a9190 an assert has been introduced, asserting the record_id of the record class is an integer. Therefore, write operations using a string as id lead to a crash if they trigger a workflow --- addons/survey/wizard/survey_answer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py index 405f6210f12..966b27458e3 100644 --- a/addons/survey/wizard/survey_answer.py +++ b/addons/survey/wizard/survey_answer.py @@ -404,7 +404,7 @@ class survey_question_wiz(osv.osv_memory): result['context'] = context else: survey_obj.write(cr, uid, survey_id, {'tot_comp_survey' : sur_rec.tot_comp_survey + 1}) - sur_response_obj.write(cr, uid, [sur_name_read.response], {'state' : 'done'}) + sur_response_obj.write(cr, uid, [int(sur_name_read.response)], {'state' : 'done'}) # mark the survey request as done; call 'survey_req_done' on its actual model if context.get('active_model') in self.pool: @@ -792,7 +792,7 @@ class survey_question_wiz(osv.osv_memory): if val and key.split('_')[1] == "commentcolumn" and key.split('_')[0] == que_id: for res_id in response_list: if key.split('_')[2] in res_id.split('_')[1]: - a = res_ans_obj.write(cr, uid, [res_id.split('_')[0]], {'comment_field':val}) + a = res_ans_obj.write(cr, uid, [int(res_id.split('_')[0])], {'comment_field':val}) sur_name_read['store_ans'][resp_id].update({key:val}) if comment_field and comment_value: