[MERGE] res.users: make set-only password field more user-friendly

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

bzr revid: odo@openerp.com-20110905090936-s84b6dc18gr6p6gl
This commit is contained in:
Olivier Dony 2011-09-05 11:09:36 +02:00
commit d462066939
2 changed files with 4 additions and 3 deletions

View File

@ -111,7 +111,8 @@
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="login" select="1"/>
<field name="new_password" password="True"/>
<field name="id" invisible="1"/>
<field name="new_password" password="True" attrs="{'required': [('id','=',False)]}"/>
<field name="active"/>
</group>
<notebook colspan="4">

View File

@ -221,8 +221,8 @@ class users(osv.osv):
'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(_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!"),
string='Set password', help="Specify a value only when creating a user or if you're changing the user's password, "
"otherwise leave empty. After a change of password, the user has to login again."),
'user_email': fields.char('Email', size=64),
'signature': fields.text('Signature', size=64),
'active': fields.boolean('Active'),