Hi,
how to get Geo-Location (GPS-Coordinates) in Odoo form where the user post the entry...and save in database.
For Eample
i want to save user location in database where he post any entry .
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
how to get Geo-Location (GPS-Coordinates) in Odoo form where the user post the entry...and save in database.
For Eample
i want to save user location in database where he post any entry .
Seems like via the controller but how does one consume the endpoints in a model to capture the coordinates?
Hi,
To get the user location you can use the following code,
country_code_val = request.session['geoip'].get('country_code')
if country_code:
country_id = request.env['res.country'].search([('code', '=', country_code)], limit=1).id
You can add a new field and can save this to that field, Thanks
What would a "request" be in this context?
Create an account today to enjoy exclusive features and engage with our awesome community!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
Odoo 15 geolocation
Вирішено
|
|
1
вер. 22
|
5236 | |
|
3
черв. 25
|
884 | ||
Bulk geolocate existing partners
Вирішено
|
|
1
груд. 24
|
4026 | |
|
0
груд. 24
|
872 | ||
|
2
лип. 24
|
2106 |