跳至內容
選單
此問題已被標幟
3611 瀏覽次數

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
11月 20
3194
1
5月 22
4555
0
11月 21
21
0
11月 21
3657
2
8月 21
7300