跳至內容
選單
此問題已被標幟
2 回覆
4736 瀏覽次數

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()")

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
4月 24
2424
2
2月 23
6418
Database Odoo 已解決
1
3月 18
3636
1
3月 17
3562
1
8月 16
5156