跳至内容
菜单
此问题已终结
2 回复
4588 查看

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
2256
2
2月 23
6338
Database Odoo 已解决
1
3月 18
3488
1
3月 17
3429
1
8月 16
5073