Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
6463 Переглядів

My question is how can I get the name of the database, where I am accessing, by python code.

Аватар
Відмінити
Найкраща відповідь

Hi Michael,

You can actually get the data from the Odoo cursor. New API:

db_name = self._cr.dbname

Old API:

db_name = cr.dbname

db_name will then contain the name of your database.

Regards,
Yenthe

Аватар
Відмінити