How to get the location address of the user? 
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
- सीआरएम
- e-Commerce
- लेखांकन
- इन्वेंटरी
- PoS
- Project
- MRP
This question has been flagged
            
                4
                
                    Replies
                
            
        
        
            
                8191
                
                    Views
                
            
        
    How to get the location address of the user? 
If you are looking with ip, then give free request to ipinfo.io
eg:
import re
import json
from urllib2 import url
openurl = 'http://ipinfo.io/json'
response = urlopen(url)
data = json.load(response)
# Here data will contain all info related with the requested ip,
###########
# output
{u'loc': u'10.0333,76.3000', u'city': u'Edapally', u'ip': 
u'137.97.91.82', u'region': u'Kerala', u'country': u'IN', u'org': 
u'AS55836 Reliance Jio Infocomm Limited', u'postal': u'682024'}This kind of requests each time when login employee helps?? or try google map geolocation API or places API
Thanks.
Thanks Hilar.
Welcome :)
On Fri, Mar 16, 2018 at 6:28 AM, Giezel Esteves <giezelesteves23@gmail.com> wrote:
Thanks Hilar.
--
Giezel Esteves
--
|   | 
 | 
user_id = fields.Many2one('res.users', string='Users')
address_from = fields.Char(string='Adress', index=True)
@api.onchange('user_id')
def _onchange_user_id(self):
self. address_from = self.user_id.address
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up| Related Posts | Replies | Views | Activity | |
|---|---|---|---|---|
|  | 1 अग॰ 17  | 5500 | ||
|  | 2 अप्रैल 20  | 4394 | ||
|  | 1 अग॰ 17  | 4268 | ||
| 
            
                Paypal redirection
            
            
                    Solved
            
         |  | 2 अप्रैल 17  | 4141 | |
|  | 1 अक्तू॰ 25  | 268 | 




 
                        
Uh this is very little info. By the IP for example?