[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) <yti@odoo.com>
This commit is contained in:
jugj-odoo
2023-10-19 14:47:18 +00:00
parent bf67f1e20e
commit da28dc6618
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -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
@@ -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([
+2 -2
View File
@@ -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