Skip to Content
Menu
This question has been flagged
1 Atsakyti
5195 Rodiniai

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

Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
rugp. 25
181
0
rugp. 25
291
1
rugp. 25
683
1
rugp. 25
530
4
liep. 25
1890