Menu

Помощь

1

How to find the current working Database in Odoo?

Avatar
Gopalakrishnan Kasilingam
Аватар
Отменить
5 Ответы
1
Avatar
Akhil P Sivan
Best Answer

Just activate the developer mode which can be found in "About odoo" under user at right top. Then db name will be displayed like User(Db name) at right top.

Аватар
Отменить
1
Avatar
Haresh Kansara
Best Answer

Try this:

till version 9: cr.dbname

after 9: self.env.cr.dbname

Аватар
Отменить
1
Avatar
Ivan
Best Answer

Once you've logged into a database, the URL will contain db=XXXX where XXXX is your current database.

Аватар
Отменить
1
Avatar
Bole
Best Answer

if you need it from inside the code... then
db_name = self.pool.db.dbname (in v7)

or from browser look in the link like ivan explained...
 

Аватар
Отменить
0
Avatar
Michael Mugge
Best Answer

In code, for version 10, its self.pool.db_name

Аватар
Отменить