summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_windows/thread_window.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/src/js/thread_windows/thread_window.js')
-rw-r--r--addons/mail/static/src/js/thread_windows/thread_window.js7
1 files changed, 3 insertions, 4 deletions
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 {