Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4313 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 8 23
5281
0
thg 6 21
2358
2
thg 5 24
5173
2
thg 6 22
4634
0
thg 6 21
2589