Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
6471 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć