From 748de223ee0358d647fc6a0a80bbe39b84749290 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandre=20K=C3=BChn?= <aku@odoo.com>
Date: Tue, 18 Apr 2023 13:12:11 +0000
Subject: [PATCH] [FIX] mail: correct breadcrumb when open discuss from chat
 window
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Before this commit, when opening Discuss from chat window and
then accessing the settings page of a channel, the breadcrumb
showed "Unamed" as the name of the App instead of "Discuss".

This happens because the client action was not named when expanding
the chat window by opening Discuss app.

closes odoo/odoo#118941

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
---
 addons/mail/i18n/mail.pot                        | 1 +
 addons/mail/static/src/models/discuss/discuss.js | 1 +
 2 files changed, 2 insertions(+)

diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot
index f464444f1c25..136f353543f9 100644
--- a/addons/mail/i18n/mail.pot
+++ b/addons/mail/i18n/mail.pot
@@ -1763,6 +1763,7 @@ msgstr ""
 #. module: mail
 #. openerp-web
 #: code:addons/mail/static/src/widgets/discuss/discuss.js:0
+#: code:addons/mail/static/src/models/discuss/discuss.js:0
 #: model:ir.actions.client,name:mail.action_discuss
 #: model:ir.ui.menu,name:mail.mail_menu_technical
 #: model:ir.ui.menu,name:mail.menu_root_discuss
diff --git a/addons/mail/static/src/models/discuss/discuss.js b/addons/mail/static/src/models/discuss/discuss.js
index b7c5e1250b49..4d073af740d7 100644
--- a/addons/mail/static/src/models/discuss/discuss.js
+++ b/addons/mail/static/src/models/discuss/discuss.js
@@ -193,6 +193,7 @@ function factory(dependencies) {
                 this.env.bus.trigger('do-action', {
                     action: 'mail.action_discuss',
                     options: {
+                        name: this.env._t("Discuss"),
                         active_id: this.threadToActiveId(this),
                         clear_breadcrumbs: false,
                         on_reverse_breadcrumb: () => this.close(),
-- 
GitLab