Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
6675 Переглядів

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.

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Автор Найкраща відповідь

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.

Аватар
Відмінити