Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
6674 Prikazi

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
Opusti
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
Opusti
Avtor 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
Opusti