From e6ad80b2805f3106c66efee29a4434408cb6ccfe Mon Sep 17 00:00:00 2001 From: Kevin Baptiste Date: Thu, 9 Feb 2023 08:41:34 +0000 Subject: [PATCH] [FIX] hr_holidays: remove stress days for access rights test The access rights tests would fail on databases created on day 0 and test executed on day 1 because of the stress day demo data, they would overlap. Testing for stress days' access rights are done in dedicated tests, thus it's ok to delete all the existing ones here. closes odoo/odoo#112312 X-original-commit: 3a2fd05026c0b0ae7fb852f59d1a74f0fc3db3b2 Signed-off-by: Kevin Baptiste --- addons/hr_holidays/tests/test_access_rights.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/hr_holidays/tests/test_access_rights.py b/addons/hr_holidays/tests/test_access_rights.py index b3e9e338c7d..13dbab91b32 100644 --- a/addons/hr_holidays/tests/test_access_rights.py +++ b/addons/hr_holidays/tests/test_access_rights.py @@ -70,6 +70,10 @@ class TestHrHolidaysAccessRightsCommon(TestHrHolidaysCommon): cls.lt_validation_both ] + # Here we only test access rights, prevent any conflict with + # existing stress days - they are tested someplace else. + cls.env['hr.leave.stress.day'].search([]).unlink() + def request_leave(self, user_id, date_from, number_of_days, values=None): values = dict(values or {}, **{ 'date_from': date_from,