Rifakat (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-server/6.0-opw-578249-res_users-rha into 
lp:openobject-server/6.0.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/6.0-opw-578249-res_users-rha/+merge/121834

Hello,

fields.function of res.users, new_password, returns lambda argument as blank 
string which is
wrong. Function field implementation should return dictionary.

Please review this fix.

Regards,
Rifakat Haradwala
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/6.0-opw-578249-res_users-rha/+merge/121834
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/6.0-opw-578249-res_users-rha.
=== modified file 'bin/addons/base/res/res_user.py'
--- bin/addons/base/res/res_user.py	2012-08-22 15:34:54 +0000
+++ bin/addons/base/res/res_user.py	2012-08-29 11:18:35 +0000
@@ -205,6 +205,9 @@
             # will face unexpected 'Access Denied' exceptions.
             raise osv.except_osv(_('Operation Canceled'), _('Please use the change password wizard (in User Preferences or User menu) to change your own password.'))
         self.write(cr, uid, id, {'password': value})
+    
+    def _get_password(self, cr, uid, ids, arg, karg, context=None):
+        return dict.fromkeys(ids, '')
 
     _columns = {
         'name': fields.char('User Name', size=64, required=True, select=True,
@@ -213,7 +216,7 @@
         'login': fields.char('Login', size=64, required=True,
                              help="Used to log into the system"),
         'password': fields.char('Password', size=64, invisible=True, help="Keep empty if you don't want the user to be able to connect on the system."),
-        'new_password': fields.function(lambda *a:'', method=True, type='char', size=64,
+        'new_password': fields.function(_get_password, method=True, type='char', size=64,
                                 fnct_inv=_set_new_password,
                                 string='Change password', help="Only specify a value if you want to change the user password. "
                                 "This user will have to logout and login again!"),

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to