[MERGE] Merged lp:openobject-addons.

bzr revid: psa@tinyerp.com-20121206094413-w5sceu5d3xq9q9rc
This commit is contained in:
Paramjit Singh Sahota
2012-12-06 15:14:13 +05:30
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -254,6 +254,6 @@ class res_users(osv.Model):
# overridden to automatically invite user to sign up
user_id = super(res_users, self).create(cr, uid, values, context=context)
user = self.browse(cr, uid, user_id, context=context)
if user.email:
if context and context.get('reset_password') and user.email:
user.action_reset_password()
return user_id
+5
View File
@@ -2,6 +2,11 @@
<openerp>
<data>
<!-- 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>
<record id="res_users_form_view" model="ir.ui.view">
<field name="name">user.form.state</field>
<field name="model">res.users</field>