[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
This commit is contained in:
Kartik Chavda
2022-11-30 20:03:12 +01:00
parent eb74950670
commit f483d9304f
@@ -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):