From eec4143d7a20c5411ef663f24a434e286042632d Mon Sep 17 00:00:00 2001 From: "Dharmraj Jhala (OpenERP)" Date: Mon, 24 Mar 2014 18:00:19 +0530 Subject: [PATCH] [IMP] used formatted string with % for url bzr revid: dizzy.zala@gmail.com-20140324123019-bcnlwgfo3z3f83j1 --- addons/survey/controllers/main.py | 4 +--- addons/survey/survey.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/survey/controllers/main.py b/addons/survey/controllers/main.py index 15a4003c1ac..305fe050ddc 100644 --- a/addons/survey/controllers/main.py +++ b/addons/survey/controllers/main.py @@ -266,9 +266,7 @@ class WebsiteSurvey(http.Controller): else: vals.update({'state': 'skip'}) user_input_obj.write(cr, uid, user_input_id, vals, context=context) - ret['redirect'] = '/survey/fill/%s/%s' % (survey.id, post['token']) - if go_back: - ret['redirect'] += '/prev' + ret['redirect'] = '/survey/fill/%s/%s%s' % (survey.id, post['token'],'/prev' if go_back else '') return json.dumps(ret) # Printing routes diff --git a/addons/survey/survey.py b/addons/survey/survey.py index c330ea940ea..bcbc8ab5a50 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -290,7 +290,7 @@ class survey_survey(osv.Model): ''' Open the website page with the survey form ''' trail = "" if context and 'survey_token' in context: - trail = "/" + context['survey_token'] + trail = "/%s" % (context['survey_token']) return { 'type': 'ir.actions.act_url', 'name': "Start Survey", @@ -339,7 +339,7 @@ class survey_survey(osv.Model): ''' Open the website page with the survey printable view ''' trail = "" if context and 'survey_token' in context: - trail = "/" + context['survey_token'] + trail = "/%s" % (context['survey_token']) return { 'type': 'ir.actions.act_url', 'name': "Print Survey",