[FIX] base: avoid keeping password wizards in the database longer than necessary
authorOlivier Dony <odo@openerp.com>
Thu, 6 Feb 2014 16:45:59 +0000 (17:45 +0100)
committerOlivier Dony <odo@openerp.com>
Thu, 6 Feb 2014 16:45:59 +0000 (17:45 +0100)
 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

openerp/addons/base/res/wizard/change_password_wizard.py

index 4d1bfe6..5812460 100644 (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',
         }