[IMP] portal managment: write email all time

bzr revid: chm@openerp.com-20130517160100-oos81x3x3994po6b
This commit is contained in:
Christophe Matthieu 2013-05-17 18:01:00 +02:00
parent 854671b930
commit 41c10c5de7
1 changed files with 2 additions and 2 deletions

View File

@ -159,6 +159,8 @@ class wizard_user(osv.osv_memory):
for wizard_user in wizards:
portal = wizard_user.wizard_id.portal_id
user = self._retrieve_user(cr, SUPERUSER_ID, wizard_user, context)
if wizard_user.partner_id.email != wizard_user.email:
wizard_user.partner_id.write({'email': wizard_user.email})
if wizard_user.in_portal:
# create a user if necessary, and make sure it is in the portal group
if not user:
@ -167,8 +169,6 @@ 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()
if wizard_user.partner_id.email != wizard_user.email:
wizard_user.partner_id.write({'email': wizard_user.email})
wizard_user.refresh()
self._send_email(cr, uid, wizard_user, context)
else: