Skip to Content
Menú
This question has been flagged
2 Respostes
6673 Vistes

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
Descartar
Best Answer

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
Descartar
Autor Best Answer

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
Descartar