Comment 4 for bug 1162914

Revision history for this message
electro (electro1) wrote :

II've done all of my best to investigate this issue.

I remark that we are talking about the case

1. Go to user profile
2. Create a new user or Click on button to reset password
3. Go to email and click on link to reset password

OpenErp will show the reset login form for a bit and immediately the page is redirected to the standard login form with username in readonly

This is not deterministic.

I found that WHEN the procedure is CORRECT I've in the log:
2013-07-05 07:36:59,476 46265 INFO MYDB werkzeug: 127.0.0.1 "POST /auth_signup/get_config HTTP/1.1" 200 -
2013-07-05 07:36:59,975 46265 INFO MYDB werkzeug: 127.0.0.1 "POST /auth_signup/retrieve HTTP/1.1" 200 -

while WHEN is WRONG I've get_config and retrieve calls in reverse order
2013-07-05 09:47:43,361 12032 INFO MYDB werkzeug: 127.0.0.1 "POST /auth_signup/retrieve HTTP/1.1" 200 -
2013-07-05 09:47:44,176 12032 INFO MYDB werkzeug: 127.0.0.1 "POST /auth_signup/get_config HTTP/1.1" 200 -

I've understood that this function are called by 2 different thread, each of them produce a login form. So final login form is that one is produced by latest thread

Threading related issues are really hard to investigate and I'm unable to go on. Anyway I've found a workaround waiting for a real solution.

My Workaround introduce a sleep(0.5) in /auth_signup/retrieve so it will finish as latest and reset will work as expected

I KNOW THIS IS A VERY BAD SOLUTION but I hope that someone who knows openerp source better than me will find a real solution to this issue