[ADD] Added res.users auth_signup infobox for reset password

bzr revid: fme@openerp.com-20130313162045-zuzl2p2ooijjmvl6
This commit is contained in:
Fabien Meghazi 2013-03-13 17:20:45 +01:00
parent ebfd563ce2
commit 00eb6837dd
2 changed files with 5 additions and 0 deletions

View File

@ -169,6 +169,7 @@ class res_users(osv.Model):
_columns = {
'state': fields.function(_get_state, string='Status', type='selection',
selection=[('new', 'New'), ('active', 'Active'), ('reset', 'Resetting Password')]),
'signup_url': fields.related('partner_id', 'signup_url', type='char', string='Reset password', readonly=True),
}
def signup(self, cr, uid, values, token=None, context=None):

View File

@ -17,6 +17,10 @@
<header>
<field name="state" widget="statusbar"/>
</header>
<div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('state', '!=', 'reset')]}">
<p><b>This user received a link in order to reset his password.</b></p>
<p><field class="oe_inline" name="signup_url" widget="url" text="Click here to change the password by yourself."/> (this will log you out)</p>
</div>
</xpath>
<!-- add Reset Password button -->
<xpath expr="//div[@class='oe_right oe_button_box']" position="replace">