[MERGE]: merging from same branch
bzr revid: vmt@openerp.com-20091125141435-vsxil5iy8pa69jgj
This commit is contained in:
committed by
Vo Minh Thu
parent
7e098c3fa9
commit
0232413678
@@ -41,6 +41,7 @@ from string import letters, digits
|
||||
from osv import fields,osv
|
||||
import pooler
|
||||
import tools
|
||||
from tools.translate import _
|
||||
from service import security
|
||||
|
||||
magic_md5 = '$1$'
|
||||
@@ -218,6 +219,8 @@ class users(osv.osv):
|
||||
# Add handlers for 'input_pw' field.
|
||||
|
||||
def set_pw( self, cr, uid, id, name, value, args, context ):
|
||||
if not value:
|
||||
raise osv.except_osv(_('Error'), _("Please specify the password !"))
|
||||
self.write( cr, uid, id, { 'password' : encrypt_md5( value, gen_salt() ) } )
|
||||
del value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user