2012-10-02 14:57:57 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<openerp>
|
|
|
|
<data>
|
|
|
|
|
2012-12-06 09:36:03 +00:00
|
|
|
<!-- add context in action to enable automatic reset password -->
|
|
|
|
<record id="base.action_res_users" model="ir.actions.act_window">
|
|
|
|
<field name="context">{'reset_password': True}</field>
|
|
|
|
</record>
|
|
|
|
|
2012-10-02 14:57:57 +00:00
|
|
|
<record id="res_users_form_view" model="ir.ui.view">
|
|
|
|
<field name="name">user.form.state</field>
|
|
|
|
<field name="model">res.users</field>
|
|
|
|
<field name="inherit_id" ref="base.view_users_form"/>
|
|
|
|
<field name="arch" type="xml">
|
2012-12-03 14:44:24 +00:00
|
|
|
<!-- add state field in header -->
|
2012-10-02 14:57:57 +00:00
|
|
|
<xpath expr="//sheet" position="before">
|
|
|
|
<header>
|
|
|
|
<field name="state" widget="statusbar"/>
|
|
|
|
</header>
|
2013-03-14 16:01:41 +00:00
|
|
|
<div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('signup_valid', '!=', True)]}">
|
|
|
|
<p attrs="{'invisible': [('state', '!=', 'active')]}">
|
2013-03-14 15:40:03 +00:00
|
|
|
<b>A password reset has been requested for this user. An email containing the following link has been sent:</b>
|
2013-03-14 11:50:28 +00:00
|
|
|
</p>
|
2013-03-14 16:01:41 +00:00
|
|
|
<p attrs="{'invisible': [('state', '!=', 'new')]}">
|
2013-03-14 22:33:26 +00:00
|
|
|
<b>An invitation email containing the following subscription link has been sent:</b>
|
2013-03-14 11:50:28 +00:00
|
|
|
</p>
|
2013-03-14 15:40:03 +00:00
|
|
|
<p><field class="oe_inline" name="signup_url" widget="url"/></p>
|
2013-03-14 11:50:28 +00:00
|
|
|
<field name="signup_valid" invisible="1"/>
|
2013-03-13 16:20:45 +00:00
|
|
|
</div>
|
2012-10-02 14:57:57 +00:00
|
|
|
</xpath>
|
2012-12-03 14:44:24 +00:00
|
|
|
<!-- add Reset Password button -->
|
2012-12-20 12:52:42 +00:00
|
|
|
<xpath expr="//div[@class='oe_right oe_button_box']" position="replace">
|
2012-12-03 14:44:24 +00:00
|
|
|
<div class="oe_right oe_button_box">
|
2013-03-14 22:33:26 +00:00
|
|
|
<button string="Send reset password link by email"
|
2013-03-14 16:01:41 +00:00
|
|
|
type="object" name="action_reset_password"
|
|
|
|
attrs="{'invisible': [('state', '!=', 'active')]}"/>
|
|
|
|
<button string="Send an invitation email"
|
2013-03-14 16:39:13 +00:00
|
|
|
type="object" name="action_reset_password" context="{'create_user': 1}"
|
2013-03-14 16:01:41 +00:00
|
|
|
attrs="{'invisible': [('state', '!=', 'new')]}"/>
|
2012-12-03 14:44:24 +00:00
|
|
|
</div>
|
|
|
|
</xpath>
|
2012-10-02 14:57:57 +00:00
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
</data>
|
|
|
|
</openerp>
|