[FIX] portal: access management, do not re-send emails

When confirming the portal access management wizard,
the invitation email was sent to
users already having access to the portal,
while it should be sent only to
the users for who the access has just
been granted.

opw-650357
This commit is contained in:
Denis Ledoux 2015-10-20 14:26:09 +02:00
parent 92bfe3208a
commit c456d5f1a7
1 changed files with 1 additions and 1 deletions

View File

@ -175,8 +175,8 @@ class wizard_user(osv.osv_memory):
user.write({'active': True, 'groups_id': [(4, portal.id)]})
# prepare for the signup process
user.partner_id.signup_prepare()
self._send_email(cr, uid, wizard_user, context)
wizard_user.refresh()
self._send_email(cr, uid, wizard_user, context)
else:
# remove the user (if it exists) from the portal group
if user and (portal in user.groups_id):