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

Hi,
how to get Geo-Location (GPS-Coordinates) in Odoo form where the user post the entry...and save in database.

For Eample
i want to save user location in database where he post any entry .

아바타
취소
베스트 답변

Seems like via the controller but how does one consume the endpoints in a model to capture the coordinates? 

아바타
취소
베스트 답변

Hi,

To get the user location you can use the following code,

country_code_val = request.session['geoip'].get('country_code')
if country_code:
country_id = request.env['res.country'].search([('code', '=', country_code)], limit=1).id
 
 


You can add a new field and can save this to that field, Thanks

아바타
취소

What would a "request" be in this context?

관련 게시물 답글 화면 활동
Odoo 15 geolocation 해결 완료
1
9월 22
5299
3
6월 25
1007
1
12월 24
4131
0
12월 24
970
2
7월 24
2337