openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #02866
[Bug 903076] Re: can not set / change web.base.url
Some word of explanation: the part of the code you are quoting first initializes the web.base.url with a default value only for the duration of the database creation. As soon as the admin logs into the system with the web client, the second part of the code you are quoting will set the web.base.url value to the base url the admin is using to connect to the web client.
Changing the value manually would not be a good idea, as it will be reset anyway as soon as the admin connects again.
However you are right, at the moment the second part of the system does
not work in all cases, so something needs to be corrected there (I'm
reopening the bug for this part)
** Changed in: openobject-addons
Status: Invalid => Confirmed
** Changed in: openobject-addons
Importance: Undecided => Medium
** Changed in: openobject-addons
Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)
** Project changed: openobject-addons => openobject-server
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/903076
Title:
can not set / change web.base.url
Status in OpenERP Server:
Confirmed
Bug description:
apparently this is set as default, but IMHO will rarely be the one
useful in production envirenment
"web.base.url": lambda: "http://localhost:%s" %
config.get('xmlrpc_port'),
IMHO it must be possilbe to change this value somewhere
this seems not to do it.
./openobject-server/openerp/addons/base/res/res_users.py
if uid == openerp.SUPERUSER_ID:
# Successfully logged in as admin!
# Attempt to guess the web base url...
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['base_location'])
cr.commit()
except Exception:
logging.getLogger('res.users').exception("Failed to update web.base.url configuration parameter")
finally:
cr.close()
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/903076/+subscriptions
References