[FIX] base: avoid keeping password wizards in the database longer than necessary

This patch deletes the wizard lines rather than
 the wizard record itself, to avoid errors in case
 the client reloads the wizard data before actually
 closing it.

lp bug: https://launchpad.net/bugs/1271165 fixed

bzr revid: odo@openerp.com-20140206164559-j0j9o30im0u2hl2g
This commit is contained in:
Olivier Dony 2014-02-06 17:45:59 +01:00
parent 4818a83f26
commit 7c53d8c2d1
1 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,8 @@ class change_password_wizard(osv.TransientModel):
for user in wizard.user_ids:
user_ids.append(user.id)
self.pool.get('change.password.user').change_password_button(cr, uid, user_ids, context=context)
# don't keep temporary password copies in the database longer than necessary
self.pool.get('change.password.user').unlink(cr, uid, user_ids)
return {
'type': 'ir.actions.act_window_close',
}