From 5c004c2e832a9ca6efbe1df1160051ed2cd44c5d Mon Sep 17 00:00:00 2001 From: mgh-odoo Date: Wed, 23 Oct 2019 11:43:29 +0000 Subject: [IMP] mail: show out of office ribbon on discuss MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds the out-of-office ribbon at the top of the conversation in the discuss app. Task-2066672 closes odoo/odoo#39362 Signed-off-by: Alexandre Kühn (aku) Co-authored-by: Mohammed Shekha --- addons/mail/static/src/js/thread_windows/thread_window.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'addons/mail/static/src/js/thread_windows/thread_window.js') diff --git a/addons/mail/static/src/js/thread_windows/thread_window.js b/addons/mail/static/src/js/thread_windows/thread_window.js index 08671354a3e..8b4eb03d9db 100644 --- a/addons/mail/static/src/js/thread_windows/thread_window.js +++ b/addons/mail/static/src/js/thread_windows/thread_window.js @@ -148,15 +148,14 @@ var ThreadWindow = AbstractThreadWindow.extend({ }, renderOutOfOffice: function () { var $outOfOffice = this.$('.o_out_of_office'); - if (!this.getOutOfOfficeInfo() && !this.getOutOfOfficeMessage()) { + const thread = this.getThread(); + if (!thread.hasOutOfOffice()) { if ($outOfOffice.length) { $outOfOffice.remove(); } return; } - var $newOutOfOffice = $(QWeb.render('mail.thread_window.OutOfOffice', { - widget: this, - })); + const $newOutOfOffice = $(QWeb.render('mail.thread.OutOfOffice', { thread })); if ($outOfOffice.length) { $outOfOffice.replaceWith($newOutOfOffice); } else { -- cgit v1.2.3