Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3639 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 20
3210
How to round sum of if code แก้ไขแล้ว
1
พ.ค. 22
4592
0
พ.ย. 21
21
0
พ.ย. 21
3689
2
ส.ค. 21
7334