summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/thread_cache
diff options
context:
space:
mode:
authorXavier Dubuc <xdu@odoo.com>2020-07-17 10:38:05 +0000
committerXavier Dubuc <xdu@odoo.com>2020-07-30 09:23:02 +0000
commite244bfa1c819e804b120ad49f37fce0aa802e529 (patch)
treeac8e2b017103fb3821d1d89b04729ee756eae778 /addons/mail/static/src/models/thread_cache
parentdcf1f48ee6729780d1d8a4fb88bf23138744ae76 (diff)
[FIX] mail: do not fetch 'user_notification' messages in thread
task-2296856 See odoo/enterprise#12095 closes odoo/odoo#55189 X-original-commit: 5aaff1547d04bccf20ef333f515811570e8b8e22 Related: odoo/enterprise#12100 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/thread_cache')
-rw-r--r--addons/mail/static/src/models/thread_cache/thread_cache.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/addons/mail/static/src/models/thread_cache/thread_cache.js b/addons/mail/static/src/models/thread_cache/thread_cache.js
index 4fdcaed6114..81027d665ba 100644
--- a/addons/mail/static/src/models/thread_cache/thread_cache.js
+++ b/addons/mail/static/src/models/thread_cache/thread_cache.js
@@ -234,7 +234,13 @@ function factory(dependencies) {
} else if (thread === this.env.messaging.moderation) {
return domain.concat([['need_moderation', '=', true]]);
} else {
- return domain.concat([['model', '=', thread.model], ['res_id', '=', thread.id]]);
+ // Avoid to load user_notification as these messages are not
+ // meant to be shown on chatters.
+ return domain.concat([
+ ['message_type', '!=', 'user_notification'],
+ ['model', '=', thread.model],
+ ['res_id', '=', thread.id],
+ ]);
}
}