summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/test_performance.py
diff options
context:
space:
mode:
authorLucas Lefèvre <lul@odoo.com>2019-02-08 13:17:23 +0100
committerLucas Lefèvre <lul@odoo.com>2019-02-13 11:03:33 +0100
commitc7aa8c5f669b5aa8d9789b812d0105ac0c4928c5 (patch)
tree39039cf2d30cec9647f7de8c03bd5845d30dc70c /addons/test_mail/tests/test_performance.py
parent0cd13b001a9c66a8cde22abf5b98332005af1f76 (diff)
[IMP] mail: allow tracking on groups protected fields
Purpose ======= Currently fields with a `groups` attribute can't be tracked. Otherwise changes would be visible by all in the chatter, including users which normally don't have the access rights because they are not members of `groups`. Specification ============= Filter tracking field values according to the `groups` attributes. Users without the access rights should not see them. If a message is only composed of tracking values and the user doesn't have the rights to see them, an empty message should not be displayed.
Diffstat (limited to 'addons/test_mail/tests/test_performance.py')
-rw-r--r--addons/test_mail/tests/test_performance.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/test_mail/tests/test_performance.py b/addons/test_mail/tests/test_performance.py
index 50744c54f56..a3706c96354 100644
--- a/addons/test_mail/tests/test_performance.py
+++ b/addons/test_mail/tests/test_performance.py
@@ -511,7 +511,7 @@ class TestHeavyMailPerformance(TransactionCase):
customer_id = self.customer.id
user_id = self.user_portal.id
- with self.assertQueryCount(__system__=161, emp=198): # com runbot: 161 - 198 // test_mail only: 161 - 192
+ with self.assertQueryCount(__system__=162, emp=199): # com runbot: 161 - 198 // test_mail only: 161 - 192
rec = self.env['mail.test.full'].create({
'name': 'Test',
'umbrella_id': umbrella_id,
@@ -540,7 +540,7 @@ class TestHeavyMailPerformance(TransactionCase):
})
self.assertEqual(rec.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id)
- with self.assertQueryCount(__system__=99, emp=120): # com runbot: 99 - 120 // test_mail only: 98 - 116
+ with self.assertQueryCount(__system__=100, emp=121): # com runbot: 99 - 120 // test_mail only: 98 - 116
rec.write({
'name': 'Test2',
'umbrella_id': self.umbrella.id,
@@ -578,7 +578,7 @@ class TestHeavyMailPerformance(TransactionCase):
})
self.assertEqual(rec.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id)
- with self.assertQueryCount(__system__=105, emp=126): # test_mail only: 105 - 122
+ with self.assertQueryCount(__system__=106, emp=127): # test_mail only: 105 - 122
rec.write({
'name': 'Test2',
'umbrella_id': umbrella_id,