Odoo Help


How to fetch current logged in database name

Nirav Bhadradiya
on 3/13/13, 10:15 AM 2,515 views

How to fetch current logged in database name at server side in particular class??

On 3/13/13, 11:19 AM

The database cursor should have it. Try:


but for that i have to inherit osv and the place(http_server.py) where i need dbname is already implemented class and used in many classes,,,so if i am trying to inherit osv.osv then it gives me::TypeError: Error when calling the metaclass bases

Nirav Bhadradiya
on 3/14/13, 1:58 AM

Could you edit your post to include more context? Paste some code and such.

on 3/14/13, 9:56 AM

Hello Allison,,thank you so much for your reply but i have done what i want, i have fetched db_name from tools.config['db_name']....Thanxxx

Nirav Bhadradiya
on 3/14/13, 10:01 AM

Hello Nirav, I use db_name=tools.config['db_name'] but the return value is False. could you please tell me how?

Voathnak Lim
on 7/21/13, 11:40 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/13/13, 10:15 AM
Seen: 2515 times
Last updated: 3/16/15, 8:10 AM