Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# generated from manifests external_dependencies
geojson
requests
shapely
17 changes: 10 additions & 7 deletions web_leaflet_lib/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==========================
Leaflet Javascript Library
==========================
Expand All @@ -17,7 +13,7 @@ Leaflet Javascript Library
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github
Expand Down Expand Up @@ -109,11 +105,15 @@ Authors
-------

* GRAP
* KMEE

Contributors
------------

- Sylvain LE GAL (https://www.twitter.com/legalsylvain)
- `KMEE <https://kmee.com.br/>`__:

- Luis Felipe Mileo <mileo@kmee.com.br>

Other credits
-------------
Expand All @@ -140,10 +140,13 @@ promote its widespread use.
.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain
.. |maintainer-mileo| image:: https://github.com/mileo.png?size=40px
:target: https://github.com/mileo
:alt: mileo

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-legalsylvain|
|maintainer-legalsylvain| |maintainer-mileo|

This module is part of the `OCA/geospatial <https://github.com/OCA/geospatial/tree/18.0/web_leaflet_lib>`_ project on GitHub.

Expand Down
17 changes: 12 additions & 5 deletions web_leaflet_lib/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
# Copyright (C) 2024 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# Copyright (C) 2025 KMEE (https://kmee.com.br)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Leaflet Javascript Library",
"summary": "Bring leaflet.js librairy in odoo.",
"version": "18.0.1.1.0",
"author": "GRAP, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"summary": "Bring leaflet.js library in Odoo with geocoding and routing support.",
"version": "18.0.1.2.0",
"author": "GRAP, KMEE, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain", "mileo"],
"website": "https://github.com/OCA/geospatial",
"license": "AGPL-3",
"category": "Extra Tools",
"depends": ["base"],
"data": ["data/ir_config_parameter.xml"],
"external_dependencies": {
"python": ["requests"],
},
"data": [
"data/ir_config_parameter.xml",
"views/res_config_settings.xml",
],
"assets": {
"web.assets_backend": [
"/web_leaflet_lib/static/lib/leaflet/*",
Expand Down
50 changes: 38 additions & 12 deletions web_leaflet_lib/data/ir_config_parameter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,53 @@
<!--
Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
Copyright (C) 2025 KMEE (https://kmee.com.br)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo noupdate="1">
<record
id="config_parameter_leaflet_copyright"
model="ir.config_parameter"
forcecreate="True"
>
<!-- Display Configuration -->
<record id="config_parameter_leaflet_copyright" model="ir.config_parameter">
<field name="key">leaflet.copyright</field>
<field
name="value"
><![CDATA[
&copy; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>]]>
</field>
><![CDATA[&copy; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>]]></field>
</record>
<record id="config_parameter_leaflet_tile_url" model="ir.config_parameter">
<field name="key">leaflet.tile_url</field>
<field name="value">False</field>
</record>

<!-- Geocoding Configuration -->
<record
id="config_parameter_leaflet_tile_url"
id="config_parameter_leaflet_geocoding_provider"
model="ir.config_parameter"
forcecreate="True"
>
<field name="key">leaflet.tile_url</field>
<field name="value">False</field>
<field name="key">leaflet.geocoding_provider</field>
<field name="value">nominatim</field>
</record>
<record id="config_parameter_leaflet_nominatim_url" model="ir.config_parameter">
<field name="key">leaflet.nominatim_url</field>
<field name="value">https://nominatim.openstreetmap.org</field>
</record>
<record
id="config_parameter_leaflet_geocoding_throttle"
model="ir.config_parameter"
>
<field name="key">leaflet.geocoding_throttle_ms</field>
<field name="value">1000</field>
</record>

<!-- Routing Configuration -->
<record id="config_parameter_leaflet_routing_provider" model="ir.config_parameter">
<field name="key">leaflet.routing_provider</field>
<field name="value">osrm</field>
</record>
<record id="config_parameter_leaflet_osrm_url" model="ir.config_parameter">
<field name="key">leaflet.osrm_url</field>
<field name="value">https://router.project-osrm.org</field>
</record>
<record id="config_parameter_leaflet_max_waypoints" model="ir.config_parameter">
<field name="key">leaflet.max_waypoints</field>
<field name="value">25</field>
</record>
</odoo>
5 changes: 5 additions & 0 deletions web_leaflet_lib/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
from . import geocoding_mixin
from . import ir_http
from . import mapbox_service
from . import osrm_service
from . import res_config_settings
from . import routing_service
Loading