From 388bf45853d154e23f0c3653094bc1aa12d06634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 18 Oct 2017 10:49:28 +0200 Subject: [PATCH] [FIX] mail: indentation issue when forward-porting Commit aab6bdd54a11cb8bdb19746a9861776d3be622a6 was incorrectly forward-ported to 10.0 at abb726d4dfaae87438471283aedd177d5432f10a . Indeed share users could land to a wrong backend or frontend page depending on the target app due to an indentation issue. --- addons/mail/controllers/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py index 4fe78246ec5..7c4f42d9f5a 100644 --- a/addons/mail/controllers/main.py +++ b/addons/mail/controllers/main.py @@ -87,9 +87,8 @@ class MailController(http.Controller): record_sudo.sudo(uid).check_access_rule('read') except AccessError: return cls._redirect_to_messaging() - - if record_action['type'] == 'ir.actions.act_url': - return werkzeug.utils.redirect(record_action['url']) + if record_action['type'] == 'ir.actions.act_url': + return werkzeug.utils.redirect(record_action['url']) url_params = { 'view_type': record_action['view_type'],