diff --git a/addons/survey/controllers/main.py b/addons/survey/controllers/main.py index 7f512549c72..b34ffda375e 100644 --- a/addons/survey/controllers/main.py +++ b/addons/survey/controllers/main.py @@ -329,8 +329,8 @@ class Survey(http.Controller): and send back this html to the survey_form widget that will inject it into the page.""" data = self._prepare_survey_data(survey_sudo, answer_sudo, **post) if answer_sudo.state == 'done': - return request.env.ref('survey.survey_fill_form_done').render(data).decode('UTF-8') - return request.env.ref('survey.survey_fill_form_in_progress').render(data).decode('UTF-8') + return request.env.ref('survey.survey_fill_form_done').render(data) + return request.env.ref('survey.survey_fill_form_in_progress').render(data) @http.route('/survey//', type='http', auth='public', website=True) def survey_display_page(self, survey_token, answer_token, **post): diff --git a/addons/survey/controllers/survey_session_manage.py b/addons/survey/controllers/survey_session_manage.py index e245d11665a..8f5f32f60f1 100644 --- a/addons/survey/controllers/survey_session_manage.py +++ b/addons/survey/controllers/survey_session_manage.py @@ -58,7 +58,7 @@ class UserInputSession(http.Controller): survey._session_trigger_next_question() template_values = self._prepare_manage_session_values(survey) template_values['is_rpc_call'] = True - return request.env.ref('survey.user_input_session_manage_content').render(template_values).decode('UTF-8') + return request.env.ref('survey.user_input_session_manage_content').render(template_values) @http.route('/survey/session/results/', type='json', auth='user', website=True) def survey_session_results(self, survey_token, **kwargs): @@ -86,7 +86,7 @@ class UserInputSession(http.Controller): 'survey': survey, 'question': survey.session_question_id, 'question_data': question_statistics, - }).decode('UTF-8') + }) @http.route('/survey/session/ranking/', type='json', auth='user', website=True) def survey_session_ranking(self, survey_token, **kwargs): @@ -104,7 +104,7 @@ class UserInputSession(http.Controller): return request.env.ref('survey.user_input_session_ranking').render({ 'animate_width': True, 'ranking': survey._prepare_ranking_values() - }).decode('UTF-8') + }) def _prepare_manage_session_values(self, survey): is_last_question = False