From 22fff5237b6e4143370478a6bc439c13d879ff81 Mon Sep 17 00:00:00 2001 From: "Richard Mathot (OpenERP)" Date: Fri, 11 Apr 2014 14:15:41 +0200 Subject: [PATCH] [FIX] Correct prefill for comment answers bzr revid: rim@openerp.com-20140411121541-pj3m0z44hwd0z89w --- addons/survey/controllers/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/survey/controllers/main.py b/addons/survey/controllers/main.py index cea83c8c088..a937cd0e826 100644 --- a/addons/survey/controllers/main.py +++ b/addons/survey/controllers/main.py @@ -193,7 +193,11 @@ class WebsiteSurvey(http.Controller): answer_value = None if answer.answer_type == 'free_text': answer_value = answer.value_free_text - elif answer.answer_type == 'text': + elif answer.answer_type == 'text' and answer.question_id.type == 'textbox': + answer_value = answer.value_text + elif answer.answer_type == 'text' and answer.question_id.type != 'textbox': + # here come comment answers for matrices, simple choice and multiple choice + answer_tag = "%s_%s" % (answer_tag, 'comment') answer_value = answer.value_text elif answer.answer_type == 'number': answer_value = answer.value_number.__str__()