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

I'm trying to make and invitation/referal link to my website app, so the user that sign in use the referal for some things, but I face that the server address I need to hardcode it in the controllers classes. Is there any functionality in Odoo that returns the current server address or domain name.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

I the technical / parameters / system parameters, there a entry named web.base.url

 that can be accessed through
self.env['ir.config_parameter'].sudo().get_param('web.base.url')

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
how to call http controller from js ? แก้ไขแล้ว
3
ส.ค. 23
5305
0
มิ.ย. 21
2377
2
พ.ค. 24
5211
2
มิ.ย. 22
4667
0
มิ.ย. 21
2607