How can i get the Geolocation of the user with lattitude and longitude when he fills the timesheet in odoo.
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
2
Replies
1869
Views
I tried this but doesnt work!
You could use Javascript for this:
<script>
$( document ).ready(function() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
console.log("Geolocation is not supported by this browser.");
}
function showPosition(position) {
console.log("Latitude: " + position.coords.latitude +
" | Longitude: " + position.coords.longitude);
}
});
</script>
You would still need additional OWL component to attach these values to your timesheet form:
https://www.odoo.com/documentation/16.0/developer/reference/frontend/owl_components.html
I hope this at least points you into the right direction!
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
3
अग॰ 25
|
2331 | ||
|
1
मई 25
|
2553 | ||
|
1
अप्रैल 25
|
3517 | ||
|
1
अप्रैल 25
|
4344 | ||
|
1
अप्रैल 25
|
1823 |