From b1c4f4058e2a353be3626b97b2f86e7948a14360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Lef=C3=A8vre?= Date: Mon, 11 Mar 2019 13:15:23 +0100 Subject: [PATCH] [IMP] hr_holidays: Test access rights post install Some module can inherit leave models and override some methods. The overridden method could access some models which require other access level. In this case, the access issues would not be found by tests because other modules are not yet installed. e.g. Recently, the `_create_resource_leave` was overridden in hr_payroll and is reading the employee's contract. A HR user approving a leave would raise an access error because he doesn't have contract rights. If the tests would have been executed post install, this bug would have been detected. --- addons/hr_holidays/tests/test_access_rights.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/tests/test_access_rights.py b/addons/hr_holidays/tests/test_access_rights.py index f2ce950f235..a5b2423821c 100644 --- a/addons/hr_holidays/tests/test_access_rights.py +++ b/addons/hr_holidays/tests/test_access_rights.py @@ -10,7 +10,7 @@ from odoo.exceptions import AccessError, ValidationError, UserError from odoo.tools import mute_logger -@tests.tagged('access_rights') +@tests.tagged('access_rights', 'post_install', '-at_install') class TestLeavesRights(TestHrHolidaysBase): def setUp(self):