2
0

account_lock_date_update: code update in tests

This commit is contained in:
Alexis de Lattre 2023-02-16 10:55:56 +01:00
parent 0232ceed5d
commit e51996937a

View File

@ -7,11 +7,13 @@ from odoo.tests.common import TransactionCase
class TestAccountLockDateUpdate(TransactionCase): class TestAccountLockDateUpdate(TransactionCase):
def setUp(self): @classmethod
super().setUp() def setUpClass(cls):
self.company = self.env.ref("base.main_company") super().setUpClass()
self.demo_user = self.env.ref("base.user_demo") cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
self.adviser_group = self.env.ref("account.group_account_manager") cls.company = cls.env.ref("base.main_company")
cls.demo_user = cls.env.ref("base.user_demo")
cls.adviser_group = cls.env.ref("account.group_account_manager")
def test_01_update_without_access(self): def test_01_update_without_access(self):
self.demo_user.write({"groups_id": [(3, self.adviser_group.id)]}) self.demo_user.write({"groups_id": [(3, self.adviser_group.id)]})