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

I have added two fields 'latitude' and 'longitude' in project form view. The user needs to fill these two fields by clicking on a button inside the form view and to select the place from pop up displaying google map. What is the best way to implement this?

아바타
취소
베스트 답변

Hello GopaKumar N G,

latitude and longitude in form view from Google Map

Place one button in form view and click method call from js 

like this,

<button string ="Geo-Location" id="geolocation_id">

this._super.apply(this, arguments);

            var self = this;

            $el.click(function(ev) {

                if (node.attrs.id === "geolocation_id") {

# Here You can Open Google map

# and get latitude and longitude values and pass it to python and update your form view field.

Thank You!

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   

아바타
취소
작성자

Could you explain in detail

베스트 답변

Hi,


Please check this: https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation

아바타
취소
관련 게시물 답글 화면 활동
1
11월 20
6780
2
9월 25
488
1
9월 24
3172
4
5월 24
13004
1
4월 24
3588