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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
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
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
1
Nov. 20
|
6141 | ||
|
1
Sept. 24
|
2654 | ||
|
4
Mai 24
|
11486 | ||
|
1
Apr. 24
|
2366 | ||
|
0
Nov. 23
|
1309 |