diff options
| author | XavierDo <xdo@odoo.com> | 2019-04-12 11:42:43 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-05-29 13:32:25 +0000 |
| commit | d917b2d072a837d0d7deb0429b7552d680f26b6f (patch) | |
| tree | 62a20b0f9bda5b503315a4e1ed5ae5c767a9b42a /addons/mail/static/src | |
| parent | 49ac956b34df7fbe4b2c51fd981787c9967f28a0 (diff) | |
[IMP] mail: improve user notification model in mail.message
Currently if a message has a res_id and a res_model it appears in the
matching record's chatter. Its access rights are computed based on this
record. This is the standard behavior of mail.message model.
User notifications are currently built on messages not having model and
res_id in order to avoid appearing on chatter. This has several drawbacks
notably access rights, redirection to the record, systray, finding back
records, ...
This commit solves those issues by adding new message_type 'user_notification'
that should be as a classic mail.message with model and res_id but without
the whole notification mechanism and without being displayed in the chatter.
An user notification is now a classic message pushed to a given partner only
and not displayed in the chatter.
Related to task 1943901
Linked to PR #32404
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/js/models/messages/message.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/models/messages/message.js b/addons/mail/static/src/js/models/messages/message.js index 2e49975c9d9..73c4ece9025 100644 --- a/addons/mail/static/src/js/models/messages/message.js +++ b/addons/mail/static/src/js/models/messages/message.js @@ -368,7 +368,7 @@ var Message = AbstractMessage.extend(Mixins.EventDispatcherMixin, ServicesMixin * @return {boolean} */ isLinkedToDocumentThread: function () { - return !!(this._documentModel !== 'mail.channel' && this._documentID); + return !!(this._documentModel !== 'mail.channel' && this._documentID && this._type !== 'user_notification'); }, /** * State whether the current user is the author of this message |
