diff --git a/tg_portal/wizard/portal_wizard.py b/tg_portal/wizard/portal_wizard.py index aa70c2a..4186508 100644 --- a/tg_portal/wizard/portal_wizard.py +++ b/tg_portal/wizard/portal_wizard.py @@ -8,6 +8,7 @@ class PortalWizard(models.TransientModel): # based on original _create_user from same wizard def _create_user(self): normalized_email = email_normalize(self.email) + default_user = self.env.ref("base.default_user") user = ( self.env["res.users"] .with_context(no_reset_password=True) @@ -22,7 +23,7 @@ def _create_user(self): user.write( { "company_id": self.env.company.id, - "company_ids": [(4, self.env.company.id)], + "company_ids": [(6, 0, default_user.company_ids.ids)], } ) return user