Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6289 มุมมอง

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

อวตาร
ละทิ้ง