[IMP] base: authenticate: use "base_location" key instead on "host"

bzr revid: chs@openerp.com-20111013143245-vrcs89hennc2beu4
This commit is contained in:
Christophe Simonis 2011-10-13 16:32:45 +02:00
parent 97ba7be42d
commit bd7c5ee6f8
1 changed files with 2 additions and 2 deletions

View File

@ -433,11 +433,11 @@ class users(osv.osv):
if uid == openerp.SUPERUSER_ID:
# Successfully logged in as admin!
# Attempt to guess the web base url...
if user_agent_env and 'host' in user_agent_env:
if user_agent_env and user_agent_env.get('base_location'):
cr = pooler.get_db(db).cursor()
try:
self.pool.get('ir.config_parameter').set_param(cr, uid, 'web.base.url',
user_agent_env['host'])
user_agent_env['base_location'])
cr.commit()
except Exception:
logging.getLogger('res.users').exception("Failed to update web.base.url configuration parameter")