[MIG] base_user_role: Migration to 12.0

This commit is contained in:
Duc Dao
2018-10-14 23:57:07 +07:00
committed by Arnaud Pineux
parent 1add92b79b
commit d844232ef0
11 changed files with 76 additions and 61 deletions

View File

@@ -28,13 +28,16 @@ class TestUserRole(TransactionCase):
self.role1_id = self.role_model.create(vals)
# ROLE_2
# Must have group_user in order to have sufficient groups. Check:
# github.com/odoo/odoo/commit/c3717f3018ce0571aa41f70da4262cc946d883b4
self.group_multi_currency_id = self.env.ref(
'base.group_multi_currency')
self.group_settings_id = self.env.ref('base.group_system')
vals = {
'name': "ROLE_2",
'implied_ids': [
(6, 0, [self.group_multi_currency_id.id,
(6, 0, [self.group_user_id.id,
self.group_multi_currency_id.id,
self.group_settings_id.id])],
}
self.role2_id = self.role_model.create(vals)