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/test_mail/tests/test_performance.py | |
| 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/test_mail/tests/test_performance.py')
| -rw-r--r-- | addons/test_mail/tests/test_performance.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py index 08ded3c4769..f87686cdf5d 100644 --- a/addons/test_mail/tests/test_performance.py +++ b/addons/test_mail/tests/test_performance.py @@ -485,7 +485,7 @@ class TestHeavyMailPerformance(TransactionCase): 'user_id': self.env.uid, }) self.assertEqual(rec.message_partner_ids, self.partners | self.env.user.partner_id) - with self.assertQueryCount(__system__=60, emp=75): # com runbot: 60 - 75 // test_mail only: 60 - 72 + with self.assertQueryCount(__system__=61, emp=75): # com runbot: 60 - 75 // test_mail only: 60 - 72 rec.write({'user_id': self.user_portal.id}) self.assertEqual(rec.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id) # write tracking message |
