Skip to content

Commit

Permalink
[IMP] survey: use keep query
Browse files Browse the repository at this point in the history
  • Loading branch information
tde-banana-odoo committed Jan 17, 2019
1 parent 60e8ec5 commit 0165558
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/survey/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from datetime import datetime
from math import ceil

from odoo import fields, http, SUPERUSER_ID
from odoo import fields, http
from odoo.addons.base.models.ir_ui_view import keep_query
from odoo.exceptions import UserError
from odoo.http import request
from odoo.tools import ustr
Expand Down Expand Up @@ -136,7 +137,7 @@ def survey_test(self, survey_id, token=None, **kwargs):
answer_sudo = survey_sudo._create_answer(user=request.env.user, test_entry=True)
except:
return werkzeug.utils.redirect('/')
return request.redirect('/survey/start/%s?token=%s' % (survey_sudo.id, answer_sudo.token))
return request.redirect('/survey/start/%s?%s' % (survey_sudo.id, keep_query('*', token=answer_sudo.token)))

@http.route('/survey/start/<int:survey_id>', type='http', auth='public', website=True)
def survey_start(self, survey_id, token=None, email=False, **post):
Expand Down

0 comments on commit 0165558

Please sign in to comment.