From f483d9304f4932e89bc506e3812673c2d5b39df3 Mon Sep 17 00:00:00 2001 From: Kartik Chavda Date: Sat, 25 Jun 2022 07:32:51 +0000 Subject: [PATCH] [IMP] hr_timesheet: improve the timesheet test case In this commit, modify the test to avoid searching the contract if hr_contract module is installed before this hr_timesheet module. task-2893556 Part-of: odoo/odoo#96330 --- addons/hr_timesheet/tests/test_timesheet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/hr_timesheet/tests/test_timesheet.py b/addons/hr_timesheet/tests/test_timesheet.py index 2a2e5b2710c..807bf8ce8e9 100644 --- a/addons/hr_timesheet/tests/test_timesheet.py +++ b/addons/hr_timesheet/tests/test_timesheet.py @@ -82,14 +82,17 @@ class TestCommonTimesheet(TransactionCase): cls.empl_employee = cls.env['hr.employee'].create({ 'name': 'User Empl Employee', 'user_id': cls.user_employee.id, + 'employee_type': 'freelance', # Avoid searching the contract if hr_contract module is installed before this module. }) cls.empl_employee2 = cls.env['hr.employee'].create({ 'name': 'User Empl Employee 2', 'user_id': cls.user_employee2.id, + 'employee_type': 'freelance', }) cls.empl_manager = cls.env['hr.employee'].create({ 'name': 'User Empl Officer', 'user_id': cls.user_manager.id, + 'employee_type': 'freelance', }) def assert_get_view_timesheet_encode_uom(self, expected):