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:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Project
- MRP
Esta pergunta foi sinalizada
2
Respostas
1861
Visualizações
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!
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
3
ago. 25
|
2316 | ||
|
1
mai. 25
|
2544 | ||
|
1
abr. 25
|
3515 | ||
|
1
abr. 25
|
4344 | ||
|
1
abr. 25
|
1820 |