summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/portal/wizard/portal_wizard.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py
index 18e3d62ece5..f3c645d2eb9 100644
--- a/addons/portal/wizard/portal_wizard.py
+++ b/addons/portal/wizard/portal_wizard.py
@@ -138,7 +138,7 @@ class PortalWizardUser(models.TransientModel):
# create a user if necessary, and make sure it is in the portal group
if not user:
company_id = wizard_user.partner_id.company_id.id
- user_portal = self.sudo().with_context(company_id=company_id)._create_user()
+ user_portal = wizard_user.sudo().with_context(company_id=company_id)._create_user()
else:
user_portal = user
wizard_user.write({'user_id': user_portal.id})