diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-09-06 17:40:59 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-09-06 17:40:59 +0200 |
| commit | d5382abeaad4d93b8def7e63cd47a86baaba8f0b (patch) | |
| tree | 6364ff760709b541eebdde4b04494b480dec87fb /addons/mail/controllers | |
| parent | c75fe95dfca366bf6c3b6a51908677039488aa4f (diff) | |
| parent | b8dd34fcbb895b8d62f3e133dcf5ee6f40a1400d (diff) | |
[MERGE] forward port branch saas-17 up to b8dd34fcbb8
Diffstat (limited to 'addons/mail/controllers')
| -rw-r--r-- | addons/mail/controllers/main.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py index 6146b5b37e5..ef1f09c8edc 100644 --- a/addons/mail/controllers/main.py +++ b/addons/mail/controllers/main.py @@ -76,7 +76,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']) |
