콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4684 화면

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
5621
0
6월 21
2714
2
5월 24
5516
2
6월 22
4962
0
6월 21
2893