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

hello guys, i want to get value from ir.config_parameter but i called it in __init__.py file outside models directory as i need it

here are the structure
models/res_config.py

from odoo import api, fields, models

class ResConfigSettings(models.TransientModel):

    _inherit = 'res.config.settings'
    efishery_sentry_dsn = fields.Char(config_parameter='sentry_dsn', default='https://:@sentry.example.com/')


__init__.py 

from odoo.http import request 

config_param = { "sentry_dsn": request.env['ir.config_parameter'].sudo().get_param('sentry_dsn')}


then i got this error, can someone  help me please? thank you

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
نوفمبر 20
3194
1
مايو 22
4546
0
نوفمبر 21
21
0
نوفمبر 21
3655
2
أغسطس 21
7297