[FIX] rating: after posting a rate, don't redirect to backend

Some user might be logged but not have the right to access issue or task.
Plus it does not make any sense to redirect to backend after rating a task or an issue.

OPW: 748579
This commit is contained in:
Cedric Snauwaert
2017-06-23 11:48:44 +02:00
parent bbc47177ce
commit e3d5176a41
-3
View File
@@ -34,9 +34,6 @@ class Rating(http.Controller):
return request.not_found()
record_sudo = request.env[rating.res_model].sudo().browse(rating.res_id)
record_sudo.rating_apply(rate, token=token, feedback=kwargs.get('feedback'))
# redirect to the form view if logged person
if request.session.uid:
return werkzeug.utils.redirect('/web#model=%s&id=%s&view_type=form' % (record_sudo._name, record_sudo.id))
return request.render('rating.rating_external_page_view', {
'web_base_url': request.env['ir.config_parameter'].sudo().get_param('web.base.url'),
'rating': rating,