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):
def setUp(self):
super().setUp()
self.company = self.env.ref("base.main_company")
self.demo_user = self.env.ref("base.user_demo")
self.adviser_group = self.env.ref("account.group_account_manager")
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
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):
self.demo_user.write({"groups_id": [(3, self.adviser_group.id)]})