[IMP] used formatted string with % for url
bzr revid: dizzy.zala@gmail.com-20140324123019-bcnlwgfo3z3f83j1
This commit is contained in:
parent
6a0fa7c3ff
commit
eec4143d7a
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue