[FIX] portal: fix regression of API migration in the portal wizard
Before the migration, send_mail() used to be called with an untainted context but after the API migration it inherited the altered context with active_test=False which caused subsequent calls to ir.mail_server#connect() to fetch inactive records.
This commit is contained in:
@@ -149,7 +149,7 @@ class PortalWizardUser(models.TransientModel):
|
||||
wizard_user.user_id.write({'active': True, 'groups_id': [(4, group_portal.id)]})
|
||||
# prepare for the signup process
|
||||
wizard_user.user_id.partner_id.signup_prepare()
|
||||
wizard_user._send_email()
|
||||
wizard_user.with_context(active_test=True)._send_email()
|
||||
wizard_user.refresh()
|
||||
else:
|
||||
# remove the user (if it exists) from the portal group
|
||||
|
||||
Reference in New Issue
Block a user