تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5060 أدوات العرض

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
4
يوليو 25
1157
1
يوليو 25
473
2
يوليو 25
432
1
يوليو 25
1689
2
يوليو 25
232