From 2450a36108b1a4d18334166b0d92c73df7cc7ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Debauche=20St=C3=A9phane?= Date: Mon, 2 Sep 2019 09:26:05 +0000 Subject: [PATCH] [FIX] mail: mention a channel from a channel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, when mentioning a channel from a channel, it crashed with following error: ``` TypeError: unhashable type: 'list' ``` This commit fixes the issue by providing a list of channel ids, instead of a list of `[4, channelID]`, when mentioning channels. closes odoo/odoo#36359 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/js/models/threads/thread.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/mail/static/src/js/models/threads/thread.js b/addons/mail/static/src/js/models/threads/thread.js index ff98906aed7..16635cfaf4f 100644 --- a/addons/mail/static/src/js/models/threads/thread.js +++ b/addons/mail/static/src/js/models/threads/thread.js @@ -345,9 +345,7 @@ var Thread = AbstractThread.extend(ServicesMixin, { body = this._generateEmojis(body); var messageData = { partner_ids: data.partner_ids, - channel_ids: _.map(data.channel_ids, function (channelID) { - return [4, channelID, false]; - }), + channel_ids: data.channel_ids, body: body, attachment_ids: data.attachment_ids, canned_response_ids: data.canned_response_ids,