跳至內容
選單
此問題已被標幟
1 回覆
4236 瀏覽次數

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')

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
8月 23
5206
0
6月 21
2307
2
5月 24
5102
2
6月 22
4549
0
6月 21
2502