# Copyright 2020 Akretion (https://www.akretion.com). # @author Pierrick Brun # 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" )