[FIX] Correct prefill for comment answers

bzr revid: rim@openerp.com-20140411121541-pj3m0z44hwd0z89w
This commit is contained in:
Richard Mathot (OpenERP) 2014-04-11 14:15:41 +02:00
parent 41447050e5
commit 22fff5237b
1 changed files with 5 additions and 1 deletions

View File

@ -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__()