From 88977a90e7a7deb0756a499ca00a7b18c19dc600 Mon Sep 17 00:00:00 2001 From: "Denis Vermylen (dve)" Date: Fri, 30 Sep 2016 11:49:10 +0200 Subject: [PATCH] [FIX] portal: fix new api forward-port migration _create_user was called on self instead of wizard_user (for wizard_user in self...) This created an ensure_one crash later on if more than one record in self. --- addons/portal/wizard/portal_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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})