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

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Change position chatter แก้ไขแล้ว
1
ส.ค. 25
168
4
ก.ค. 25
1520
1
ก.ค. 25
836
2
ก.ค. 25
859
1
ก.ค. 25
1969