Raphael Collet (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-oauth-signin-rco into 
lp:openobject-addons.

Requested reviews:
  Christophe (OpenERP) (kangol)
  Raphael Collet (OpenERP) (rco-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-oauth-signin-rco/+merge/136600

Make the modules auth_signup and auth_oauth work together.
In other words, one should be able to signup (or reset your password) by 
authenticating oneself with oauth.
(added small improvements in user form view)
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-oauth-signin-rco/+merge/136600
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-oauth-signin-rco.
=== modified file 'auth_reset_password/res_users_view.xml'
--- auth_reset_password/res_users_view.xml	2012-10-03 13:21:52 +0000
+++ auth_reset_password/res_users_view.xml	2012-11-28 09:18:22 +0000
@@ -7,11 +7,17 @@
             <field name="model">res.users</field>
             <field name="inherit_id" ref="base.view_users_form"/>
             <field name="arch" type="xml">
+                <!-- Reset Password button -->
                 <xpath expr="//sheet/*[1]" position="before">
                     <div class="oe_right oe_button_box">
-                        <button string="Reset Password" type="object" name="action_reset_password"/>
+                        <button string="Reset Password" type="object" name="action_reset_password"
+                            help="Send a special url by email to make the user (re)set their password."/>
                     </div>
                 </xpath>
+                <!-- password is never required; one can use Reset Password -->
+                <field name="new_password" position="attributes">
+                    <attribute name="attrs">{}</attribute>
+                </field>
             </field>
         </record>
 

=== modified file 'auth_signup/res_users.py'
--- auth_signup/res_users.py	2012-11-23 15:35:38 +0000
+++ auth_signup/res_users.py	2012-11-28 09:18:22 +0000
@@ -150,8 +150,12 @@
     _inherit = 'res.users'
 
     def _get_state(self, cr, uid, ids, name, arg, context=None):
-        return dict((user.id, 'new' if not user.login_date else 'reset' if user.signup_token else 'active')
-                    for user in self.browse(cr, uid, ids, context))
+        res = {}
+        for user in self.browse(cr, uid, ids, context):
+            res[user.id] = ('reset' if user.signup_valid else
+                            'active' if user.login_date else
+                            'new')
+        return res
 
     _columns = {
         'state': fields.function(_get_state, string='Status', type='selection',

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to