Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5109 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 25
360
1
thg 8 25
344
4
thg 7 25
1688
1
thg 7 25
959
2
thg 7 25
985