From da28dc6618a065da2c1c25f0b43fe24c72e5b472 Mon Sep 17 00:00:00 2001 From: jugj-odoo Date: Tue, 10 Oct 2023 16:03:09 +0200 Subject: [PATCH] [IMP] hr_attendance : Bumping counters in tests Due to the Systray item add for attendance, an additional rpc call will be performed for employees, meaning that different counters have to be bumped. closes odoo/odoo#135439 Related: odoo/upgrade#5234 Related: odoo/enterprise#47384 Signed-off-by: Yannick Tivisse (yti) --- addons/crm/tests/test_performances.py | 4 ++-- addons/mail/static/tests/helpers/webclient_setup.js | 1 + addons/test_mail_full/tests/test_rating.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/crm/tests/test_performances.py b/addons/crm/tests/test_performances.py index 05afb8af4ce..acc771fc3ef 100644 --- a/addons/crm/tests/test_performances.py +++ b/addons/crm/tests/test_performances.py @@ -50,7 +50,7 @@ class TestLeadAssignPerf(TestLeadAssignCommon): # randomness: at least 1 query with self.with_user('user_sales_manager'): self.env['res.users'].has_group('base.group_user') # warmup the cache to avoid inconsistency between community an enterprise - with self.assertQueryCount(user_sales_manager=1166): # crm 1160 / com 1165 + with self.assertQueryCount(user_sales_manager=1167): # crm 1160 / com 1165 self.env['crm.team'].browse(self.sales_teams.ids)._action_assign_leads(work_days=2) # teams assign @@ -95,7 +95,7 @@ class TestLeadAssignPerf(TestLeadAssignCommon): # randomness: at least 1 query with self.with_user('user_sales_manager'): - with self.assertQueryCount(user_sales_manager=584): # crm 582 + with self.assertQueryCount(user_sales_manager=585): # crm 582 self.env['crm.team'].browse(self.sales_teams.ids)._action_assign_leads(work_days=2) # teams assign diff --git a/addons/mail/static/tests/helpers/webclient_setup.js b/addons/mail/static/tests/helpers/webclient_setup.js index 3a6c40e6faf..921fb2814d2 100644 --- a/addons/mail/static/tests/helpers/webclient_setup.js +++ b/addons/mail/static/tests/helpers/webclient_setup.js @@ -14,6 +14,7 @@ const ROUTES_TO_IGNORE = [ "/web/webclient/load_menus", "/web/dataset/call_kw/res.users/load_views", "/web/dataset/call_kw/res.users/systray_get_activities", + "/hr_attendance/attendance_user_data", ]; const WEBCLIENT_PARAMETER_NAMES = new Set(["mockRPC", "serverData", "target", "webClientClass"]); const SERVICES_PARAMETER_NAMES = new Set([ diff --git a/addons/test_mail_full/tests/test_rating.py b/addons/test_mail_full/tests/test_rating.py index cb6c9ed5196..8d2cc0c9498 100644 --- a/addons/test_mail_full/tests/test_rating.py +++ b/addons/test_mail_full/tests/test_rating.py @@ -172,7 +172,7 @@ class TestRatingPerformance(TestRatingCommon): @users('employee') @warmup def test_rating_last_value_perfs(self): - with self.assertQueryCount(employee=1615): # tmf 1313 / com 1313 + with self.assertQueryCount(employee=1616): # tmf 1313 / com 1313 self.create_ratings('mail.test.rating.thread') with self.assertQueryCount(employee=2101): # tmf 1901 @@ -184,7 +184,7 @@ class TestRatingPerformance(TestRatingCommon): @users('employee') @warmup def test_rating_last_value_perfs_with_rating_mixin(self): - with self.assertQueryCount(employee=1722): # tmf 1419 / com 1419 + with self.assertQueryCount(employee=1723): # tmf 1419 / com 1419 self.create_ratings('mail.test.rating') with self.assertQueryCount(employee=2304): # tmf 2104