You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
427 B

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