From f5e4fbb20c095f5fe197bac8da3157ded568c1c4 Mon Sep 17 00:00:00 2001
From: Aaron Bohy <aab@odoo.com>
Date: Tue, 15 Dec 2015 12:01:25 +0100
Subject: [PATCH] [FIX] mail: correctly redirect to channels

Clicking on a channel link should open that channel in Discuss, not the channel
form view.
---
 addons/mail/static/src/js/thread.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/mail/static/src/js/thread.js b/addons/mail/static/src/js/thread.js
index b35445e8d3f0..99b4d6ba1c2f 100644
--- a/addons/mail/static/src/js/thread.js
+++ b/addons/mail/static/src/js/thread.js
@@ -90,7 +90,7 @@ var Thread = Widget.extend({
         if (id) {
             event.preventDefault();
             var model = $(event.target).data('oe-model');
-            var options = model ? {model: model, id: id} : {channel_id: id};
+            var options = model && (model !== 'mail.channel') ? {model: model, id: id} : {channel_id: id};
             this._redirect(options);
         }
     },
-- 
GitLab