summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/models/threads/abstract_thread.js
diff options
context:
space:
mode:
authorXavierDo <xdo@odoo.com>2019-01-07 10:56:19 +0000
committerXavierDo <xdo@odoo.com>2019-02-07 12:53:03 +0000
commit086405344e7302d9f7b243ba0c30d55131aeb3fe (patch)
tree2d8390249e17d6aebbcc1e83f49ed03976cf52b9 /addons/mail/static/src/js/models/threads/abstract_thread.js
parentc21d200285ebeb646b8e5be6ba233f96d9714c6f (diff)
[IMP] mail, hr_holidays: use leaves to compute im_status
When on leave, the im_status can be either leave_online or leave_offline. This will allow to display a specific icon and a default message when the user is not at the office. The leave can have an out of office message. This message will be displayed in the chat window instead of the user ooo message, and the end date of the leave will be displayed too. Technical details. Right now the im_status access leaves directly to know if a user is on leave or not. An index has been added to optimise this request (thanks to rco). A solution to optimise this would be to compute part of the information in a cron. Task: 1856205
Diffstat (limited to 'addons/mail/static/src/js/models/threads/abstract_thread.js')
-rw-r--r--addons/mail/static/src/js/models/threads/abstract_thread.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/models/threads/abstract_thread.js b/addons/mail/static/src/js/models/threads/abstract_thread.js
index d6a37967c68..a515c4d2f8a 100644
--- a/addons/mail/static/src/js/models/threads/abstract_thread.js
+++ b/addons/mail/static/src/js/models/threads/abstract_thread.js
@@ -75,6 +75,22 @@ var AbstractThread = Class.extend(Mixins.EventDispatcherMixin, {
return this._name;
},
/**
+ * By default, threads do not have out-of-office feature
+ *
+ * @return {string|undefined}
+ */
+ getOutOfOfficeInfo: function () {
+ return undefined;
+ },
+ /**
+ * By default, threads do not have out-of-office feature
+ *
+ * @return {string|undefined}
+ */
+ getOutOfOfficeMessage: function () {
+ return undefined;
+ },
+ /**
* Get the status of the thread (e.g. 'online', 'offline', etc.)
*
* @returns {string}