diff --git a/addons/auth_signup/res_users.py b/addons/auth_signup/res_users.py index 6f9890e9acb..0a8dde685f1 100644 --- a/addons/auth_signup/res_users.py +++ b/addons/auth_signup/res_users.py @@ -268,7 +268,7 @@ class res_users(osv.Model): # overridden to automatically invite user to sign up user_id = super(res_users, self).create(cr, uid, values, context=context) user = self.browse(cr, uid, user_id, context=context) - if context and context.get('reset_password') and user.email: + if user.email and (not context or not context.get('no_reset_password')): ctx = dict(context, create_user=True) self.action_reset_password(cr, uid, [user.id], context=ctx) return user_id diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py index e3047cd5edb..e363afa47cb 100644 --- a/addons/portal/wizard/portal_wizard.py +++ b/addons/portal/wizard/portal_wizard.py @@ -172,7 +172,7 @@ class wizard_user(osv.osv_memory): @return: browse record of model res.users """ res_users = self.pool.get('res.users') - create_context = dict(context or {}, noshortcut=True) # to prevent shortcut creation + create_context = dict(context or {}, noshortcut=True, no_reset_password=True) # to prevent shortcut creation values = { 'login': extract_email(wizard_user.email), 'partner_id': wizard_user.partner_id.id, diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 429a1dc2f08..0189c1682dd 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -230,6 +230,7 @@ class share_wizard(osv.TransientModel): current_user = user_obj.browse(cr, UID_ROOT, uid, context=context) # modify context to disable shortcuts when creating share users context['noshortcut'] = True + context['no_reset_password'] = True created_ids = [] existing_ids = [] if wizard_data.user_type == 'emails': diff --git a/addons/survey/wizard/survey_send_invitation.py b/addons/survey/wizard/survey_send_invitation.py index 5d96d0246f9..b27aa608c98 100644 --- a/addons/survey/wizard/survey_send_invitation.py +++ b/addons/survey/wizard/survey_send_invitation.py @@ -190,7 +190,7 @@ Thanks,''') % (name, self.pool.get('ir.config_parameter').get_param(cr, uid, 'we 'action_id': act_id[0], 'survey_id': [[6, 0, survey_ids]] } - user = user_ref.create(cr, uid, res_data) + user = user_ref.create(cr, uid, res_data, {'no_reset_password': True}) if user not in new_user: new_user.append(user) created+= "- %s (Login: %s, Password: %s)\n" % (partner.name or _('Unknown'),\