summaryrefslogtreecommitdiff
path: root/addons/mail/controllers/main.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-09-06 13:29:05 +0200
committerChristophe Simonis <chs@odoo.com>2017-09-06 13:29:05 +0200
commitb8dd34fcbb895b8d62f3e133dcf5ee6f40a1400d (patch)
tree196c99a14d51d88a2f81f12be98fb8ff2c4359f7 /addons/mail/controllers/main.py
parent16541ae2ae953195f1bd0036e474aac0014aee4b (diff)
parent64d56995e049d7e7bc3aa7af5a16603220b0d4bc (diff)
[MERGE] forward port branch saas-16 up to 64d56995e04
Diffstat (limited to 'addons/mail/controllers/main.py')
-rw-r--r--addons/mail/controllers/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py
index c1b4433e74a..25ea7b008ce 100644
--- a/addons/mail/controllers/main.py
+++ b/addons/mail/controllers/main.py
@@ -77,7 +77,10 @@ class MailController(http.Controller):
record_action = record_sudo.get_access_action(access_uid=uid)
else:
record_action = record_sudo.get_access_action()
+ if record_action['type'] == 'ir.actions.act_url' and record_action.get('target_type') != 'public':
+ return cls._redirect_to_messaging()
+ record_action.pop('target_type', None)
# the record has an URL redirection: use it directly
if record_action['type'] == 'ir.actions.act_url':
return werkzeug.utils.redirect(record_action['url'])