Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
5201 Prikazi

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

Avatar
Opusti
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

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
avg. 25
195
0
avg. 25
301
1
avg. 25
687
1
avg. 25
534
4
jul. 25
1906