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

I am working on a new module. How do  I get  information from openerp-server.conf in my python codes? for example  smtp_server info. Thanks in advance

頭像
捨棄
最佳答案

In Python you get openerp-sever.conf file information using the below code:-

from openerp.tools.config

import config

class sample(osv.osv):

_name = "sample"

dbUser = config.get("db_user")

https://www.odoo.com/forum/help-1/question/how-to-get-value-from-conf-file-47217#answer-49259

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 25
89
1
7月 25
1326
2
7月 25
232
2
7月 25
1067
4
7月 25
912