[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.
This commit is contained in:
committed by
Yannick Tivisse
parent
b98bc70350
commit
b1c4f4058e
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user