summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérome Maes <jem@openerp.com>2016-08-02 11:32:01 +0200
committerJérome Maes <jem@openerp.com>2016-08-02 13:46:25 +0200
commit77f95a2acabcd18a9261b6f1c9d3dd7ac6b78f80 (patch)
treebef68ee2852ea6c1bac0bee26054a5173e2b2526
parent0e676282673af30fe0b6b14e597b1d0f61014b4f (diff)
[FIX] portal: bad ensure_one due to migration
-rw-r--r--addons/portal/wizard/portal_wizard.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py
index d4749d8fc92..f3c645d2eb9 100644
--- a/addons/portal/wizard/portal_wizard.py
+++ b/addons/portal/wizard/portal_wizard.py
@@ -120,7 +120,6 @@ class PortalWizardUser(models.TransientModel):
""" From selected partners, add corresponding users to chosen portal group. It either granted
existing user, or create new one (and add it to the group).
"""
- self.ensure_one()
error_msg = self.get_error_messages()
if error_msg:
raise UserError("\n\n".join(error_msg))
@@ -139,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})