[FIX] web_hierarchy,hr_org_chart: remove highlight on focus record
Before this commit, the highlight added on a focus record, that styling added was useful when we displayed only the first result in the search to be able to build a tree but since now all the records found with the search made by the user are shown without building a tree if it is not possible then it is no longer needed to highlight the records found. This commit removes the highlight added on the focused record, the one found by the search since it is not really needed. task-3556262 closes odoo/odoo#138803 Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
This commit is contained in:
@@ -88,8 +88,6 @@ class TestEmployee(TestHrCommon):
|
||||
self.assertEqual(len(result), 3)
|
||||
for emp in employees:
|
||||
emp_dict = {'id': emp.id, 'parent_id': emp.parent_id.id and (emp.parent_id.id, emp.parent_id.display_name)}
|
||||
if emp == self.employee_georges:
|
||||
emp_dict['__focus__'] = True
|
||||
self.assertIn(emp_dict, result)
|
||||
|
||||
self.employee_pierre.parent_id = self.employee_georges
|
||||
@@ -97,14 +95,12 @@ class TestEmployee(TestHrCommon):
|
||||
self.assertEqual(len(result), 3)
|
||||
for emp in employees:
|
||||
emp_dict = {'id': emp.id, 'parent_id': emp.parent_id.id and (emp.parent_id.id, emp.parent_id.display_name)}
|
||||
if emp == self.employee_georges:
|
||||
emp_dict['__focus__'] = True
|
||||
self.assertIn(emp_dict, result)
|
||||
|
||||
result = HrEmployee.hierarchy_read([('id', '=', self.employee_pierre.id)], ['id'], 'parent_id')
|
||||
self.assertEqual(len(result), 2)
|
||||
self.assertIn(
|
||||
{'id': self.employee_pierre.id, 'parent_id': (self.employee_georges.id, self.employee_georges.name), '__focus__': True},
|
||||
{'id': self.employee_pierre.id, 'parent_id': (self.employee_georges.id, self.employee_georges.name)},
|
||||
result
|
||||
)
|
||||
self.assertIn(
|
||||
|
||||
Reference in New Issue
Block a user