コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6481 ビュー

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

アバター
破棄