[MIG] base_user_role_profile: Migration to 14.0

This commit is contained in:
Pierrick Brun
2020-12-18 14:05:31 +01:00
committed by KevinKhao
parent b032978510
commit ab546ebbd1
5 changed files with 22 additions and 7 deletions

View File

@@ -0,0 +1,12 @@
# Copyright 2020 Akretion (https://www.akretion.com).
# @author Pierrick Brun <pierrick.brun@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
env["res.users"].search([("profile_id", "=", False)]).profile_id = env.ref(
"base_user_role_profile.default_profile"
)