Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
6694 Näkymät

Hi,

I need to get the location/address of the user from where he is logged in, and assign it to a field either using python or by javascript. Can anyone tell me how it can be done. Thank in advance.

 

Scot.

Avatar
Hylkää
Paras vastaus

Hi,

The geolocation of user is retrieved by the navigator, so you can get it from JavaScript.

Check out this page: http://www.w3schools.com/html/html5_geolocation.asp

Avatar
Hylkää
Tekijä Paras vastaus

Thank you Aitor Bouzas. But how can I get that value and assign to a field in openerp. For example, I have a screen with the name "Client Details". In that I have a field with the name "client_location". Once the client logs in and opens the Client Details screen, I need his location automatically filled in client_location field. Any idea about that?

Thanks in Adance,

 

Scot.

Avatar
Hylkää