c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #18736
[Bug 716715] Re: [trunk 3353] db_user parameter dont work
Serge,
A fix similar to yours is available in the linked branch above and will
soon be merged in trunk. Thanks a lot for the bug report!
** Changed in: openobject-server
Status: Confirmed => Fix Committed
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/716715
Title:
[trunk 3353] db_user parameter dont work
Status in OpenERP Server:
Fix Committed
Bug description:
in sql_db.py
_dsn = ''
for p in ('host', 'port', 'user', 'password'):
cfg = tools.config['db_' + p]
if cfg:
_dsn += '%s=%s ' % (p, cfg)
def dsn(db_name):
return '%sdbname=%s' % (_dsn, db_name)
_dns set when module is import, before config file and parameter read,
and never reset after, so on my test _dns = user:user of the ubuntu
session
to solve the problem i do
def dsn(db_name):
return 'user=%s dbname=%s' % (tools.config['db_user'], db_name)
take the true user from the config
good luck with this bug, it give me a headache
References