summaryrefslogtreecommitdiff
path: root/addons/sms/static/src/js
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-07-19 14:18:17 +0000
committerThibault Delavallée <tde@odoo.com>2019-07-23 08:29:15 +0000
commit0cc6390db5e759bfbfbbf2272f342eba391926fa (patch)
treeaa7c1949d0d091d9ac093a1f1223428d061d371e /addons/sms/static/src/js
parent7ef11e3c96893dffc1bad93917c6955a38ac6002 (diff)
[FIX] sms: do not display popover for void notification
PURPOSE Improve SMS UX integration. Followup of merge 4287481 . SPECIFICATIONS Fix recent SMS merge: do not display tooltip / popover about SMS information in chatter if there was no recipients linked to the SMS message. LINKS Task 1922187
Diffstat (limited to 'addons/sms/static/src/js')
-rw-r--r--addons/sms/static/src/js/message.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/sms/static/src/js/message.js b/addons/sms/static/src/js/message.js
index f800563fd72..b5463ae9f8f 100644
--- a/addons/sms/static/src/js/message.js
+++ b/addons/sms/static/src/js/message.js
@@ -33,6 +33,14 @@ Message.include({
return this._smsStatus;
},
/**
+ * Whether message has nay SMS-related notification
+ *
+ * @returns {boolean}
+ */
+ hasSmsData: function () {
+ return !!(this._smsIds && (this._smsIds.length > 0));
+ },
+ /**
* Does the message contains at least one SMS failure
*
* @returns {boolean}