[trunk 3353] db_user parameter dont work

Bug #716715 reported by Serge
24
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Low
OpenERP's Framework R&D

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

Related branches

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Vo Minh Thu (thu) wrote :

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
Revision history for this message
Vo Minh Thu (thu) wrote :

The fix was merged in trunk at revision 3365.

Changed in openobject-server:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.