[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:
|
else:
|
||||||
vals.update({'state': 'skip'})
|
vals.update({'state': 'skip'})
|
||||||
user_input_obj.write(cr, uid, user_input_id, vals, context=context)
|
user_input_obj.write(cr, uid, user_input_id, vals, context=context)
|
||||||
ret['redirect'] = '/survey/fill/%s/%s' % (survey.id, post['token'])
|
ret['redirect'] = '/survey/fill/%s/%s%s' % (survey.id, post['token'],'/prev' if go_back else '')
|
||||||
if go_back:
|
|
||||||
ret['redirect'] += '/prev'
|
|
||||||
return json.dumps(ret)
|
return json.dumps(ret)
|
||||||
|
|
||||||
# Printing routes
|
# Printing routes
|
||||||
|
|
|
@ -290,7 +290,7 @@ class survey_survey(osv.Model):
|
||||||
''' Open the website page with the survey form '''
|
''' Open the website page with the survey form '''
|
||||||
trail = ""
|
trail = ""
|
||||||
if context and 'survey_token' in context:
|
if context and 'survey_token' in context:
|
||||||
trail = "/" + context['survey_token']
|
trail = "/%s" % (context['survey_token'])
|
||||||
return {
|
return {
|
||||||
'type': 'ir.actions.act_url',
|
'type': 'ir.actions.act_url',
|
||||||
'name': "Start Survey",
|
'name': "Start Survey",
|
||||||
|
@ -339,7 +339,7 @@ class survey_survey(osv.Model):
|
||||||
''' Open the website page with the survey printable view '''
|
''' Open the website page with the survey printable view '''
|
||||||
trail = ""
|
trail = ""
|
||||||
if context and 'survey_token' in context:
|
if context and 'survey_token' in context:
|
||||||
trail = "/" + context['survey_token']
|
trail = "/%s" % (context['survey_token'])
|
||||||
return {
|
return {
|
||||||
'type': 'ir.actions.act_url',
|
'type': 'ir.actions.act_url',
|
||||||
'name': "Print Survey",
|
'name': "Print Survey",
|
||||||
|
|
Loading…
Reference in New Issue