1 <?xml version="1.0" encoding="UTF-8"?>
5 <!-- add context in action to enable automatic reset password -->
6 <record id="base.action_res_users" model="ir.actions.act_window">
7 <field name="context">{'reset_password': True}</field>
10 <record id="res_users_form_view" model="ir.ui.view">
11 <field name="name">user.form.state</field>
12 <field name="model">res.users</field>
13 <field name="inherit_id" ref="base.view_users_form"/>
14 <field name="arch" type="xml">
15 <!-- add state field in header -->
16 <xpath expr="//sheet" position="before">
18 <field name="state" widget="statusbar"/>
20 <div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('signup_valid', '!=', True)]}">
21 <p attrs="{'invisible': [('state', '!=', 'active')]}">
22 <b>A password reset has been requested for this user. An email containing the following link has been sent:</b>
24 <p attrs="{'invisible': [('state', '!=', 'new')]}">
25 <b>An invitation email containing the following subscription link has been sent:</b>
27 <p><field class="oe_inline" name="signup_url" widget="url"/></p>
28 <field name="signup_valid" invisible="1"/>
31 <!-- add Reset Password button -->
32 <xpath expr="//div[@class='oe_right oe_button_box']//button" position="replace">
33 <button string="Send Reset Password Instructions"
35 type="object" name="action_reset_password"
36 attrs="{'invisible': [('state', '!=', 'active')]}"/>
37 <button string="Send an Invitation Email"
39 type="object" name="action_reset_password" context="{'create_user': 1}"
40 attrs="{'invisible': [('state', '!=', 'new')]}"/>