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