mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[FIX] base_user_role: renamed wizard name and use active_ids
This commit is contained in:
@@ -16,7 +16,7 @@ class TestUserRole(TransactionCase):
|
||||
)
|
||||
cls.user_model = cls.env["res.users"]
|
||||
cls.role_model = cls.env["res.users.role"]
|
||||
cls.wiz_model = cls.env["group.groups.into.role"]
|
||||
cls.wiz_model = cls.env["wizard.groups.into.role"]
|
||||
|
||||
cls.company1 = cls.env.ref("base.main_company")
|
||||
cls.company2 = cls.env["res.company"].create({"name": "company2"})
|
||||
@@ -236,7 +236,7 @@ class TestUserRole(TransactionCase):
|
||||
# Check that there is not a role with name: Test Role
|
||||
self.assertFalse(self.role_model.search([("name", "=", "Test Role")]))
|
||||
# Call create_role function to group groups into a role
|
||||
wizard = self.wiz_model.with_context(selected_group_ids=user_group_ids).create(
|
||||
wizard = self.wiz_model.with_context(active_ids=user_group_ids).create(
|
||||
{"name": "Test Role"}
|
||||
)
|
||||
wizard.create_role()
|
||||
|
||||
Reference in New Issue
Block a user