İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
8606 Görünümler

Hi,

I have a set of coordinates (latitude,longitude), I want to create a button which will open a google map with my given coordinates. Let say I have named the fields as latitude and longitude. What should be the function to open the google map in new tab with the coordinates in the given fields.

Avatar
Vazgeç
En İyi Yanıt

You might find this free module useful, it already links Partners (Customers, Vendors) to a map with a button:

https://www.odoo.com/apps/modules/12.0/web_google_maps/

This module brings four new features:

  • New view map allows user to view all partners addresses on google maps.
  • New widget gplaces_address_autocomplete, enabled Google places autocomplete address form into partner form view,
    provide autocomplete feature when you typing an address of partner (or any field using this widget)
  • New widget gplaces_autocomplete, enabled Google places autocomplete into partner form view,
    provide autocomplete feature when typing partner name (or any field using this widget)
  • Map Localization

Avatar
Vazgeç
Üretici

Well Thanks for the reply. But I was looking for some code which can help. Actually I have some data pushed by the mobile app in the database, which create records and contains the coordinates. So for validating the records the user will click on the said button and view the place given the record. It not to be used in customer. I have a separate model and a separate function to entertain

The module contains code you can leverage and move to your own separate model and your own function.

Üretici

ok Thnx. Let me read the code.

İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Mar 21
6479
3
Tem 20
20759
2
Oca 19
6794
1
Ara 18
2846
1
Tem 18
7255