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

Hi,

I would like to know if there is a way and how to proceed to programmatically know what is the current database name from within module scripts.

Thanks.

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

Try this code,

    `dbName = self._cr.dbname`

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

Hi please try this:-

>> cursor_postgres.execute("select current_database()")

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Database for my module not created แก้ไขแล้ว
4
เม.ย. 24
2348
2
ก.พ. 23
6383
Database Odoo แก้ไขแล้ว
1
มี.ค. 18
3552
1
มี.ค. 17
3475
1
ส.ค. 16
5130