I had the same problem on a production server that was working for long time. Suddenly I started to get the logout issue and after trying every solution I found in the forums, nothing worked. Then I decided to check the logs and I found this:
2018-06-13 20:48:52,798 13774 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
execute(self.server.app)
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 193, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/odoo/service/server.py", line 244, in app
return self.app(e, s)
File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 186, in application
return application_unproxied(environ, start_response)
File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 172, in application_unproxied
result = handler(environ, start_response)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1325, in __call__
self.load_addons()
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1346, in load_addons
m = __import__('odoo.addons.' + module)
File "/usr/lib/python2.7/dist-packages/odoo/modules/module.py", line 81, in load_module
execfile(modfile, new_mod.__dict__)
File "/usr/lib/python2.7/dist-packages/odoo/addons_extra/target_achievement_invoice/__init__.py", line 22, in <module>
import models
File "/usr/lib/python2.7/dist-packages/odoo/addons_extra/target_achievement_invoice/models/__init__.py", line 22, in <module>
import find_user_target
File "/usr/lib/python2.7/dist-packages/odoo/addons_extra/target_achievement_invoice/models/find_user_target.py", line 119
'percent': round( ((target>0)? (target_bal / target) : 0) * 100, 1),
This addon was not installed on any of my instances but the code was returning the error !. I just moved that addon from the addons folder, restarted odoo and it worked again.
Hope that helps