[FIX] base_user_role: renamed wizard name and use active_ids

This commit is contained in:
ArnauCForgeFlow
2024-01-25 15:40:25 +01:00
parent 168272bec7
commit c46475f056
4 changed files with 9 additions and 9 deletions

View File

@@ -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()