[FIX] auth_signup: change the user status to 'reset' when a valid signup token is present

bzr revid: rco@openerp.com-20121128090335-rq0xpjajg6bt2xde
This commit is contained in:
Raphael Collet 2012-11-28 10:03:35 +01:00
parent 7c61b7142d
commit 572f0a76d8
1 changed files with 6 additions and 2 deletions

View File

@ -150,8 +150,12 @@ class res_users(osv.Model):
_inherit = 'res.users'
def _get_state(self, cr, uid, ids, name, arg, context=None):
return dict((user.id, 'new' if not user.login_date else 'reset' if user.signup_token else 'active')
for user in self.browse(cr, uid, ids, context))
res = {}
for user in self.browse(cr, uid, ids, context):
res[user.id] = ('reset' if user.signup_valid else
'active' if user.login_date else
'new')
return res
_columns = {
'state': fields.function(_get_state, string='Status', type='selection',