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

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Try this:

till version 9: cr.dbname

after 9: self.env.cr.dbname

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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...
 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 23
5559
0
มิ.ย. 21
3410
Staging to Production database แก้ไขแล้ว
3
ก.พ. 25
7111
Forgotten Database Master Password issue แก้ไขแล้ว
5
ก.ค. 24
8523
3
ม.ค. 17
5550