Leaflet Map View (OpenStreetMap)
web_view_leaflet_map · OCA/geospatial
-
Security25/25No findings
-
Activity20/25Last human commit 10 months ago
-
Required by20/252 modules depend on it
-
Maturity18/25In 3 Odoo series since 12.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE ir_act_window SET view_mode=replace(view_mode, ',leaflet_map', '')WHERE view_mode LIKE '%,leaflet_map%';` - re-check the table/column names still match after upgrading. (3 occurrences in this file) migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module extends odoo views, to add a new kind of view, named
leaflet_map that is using the Leaflet javascript library to use maps.
(https://leafletjs.com/) This library is for exemple, used in the
OpenStreetMap project. (https://www.openstreetmap.org/)
You can see a simple usage in the module web_view_leaflet_map_partner
in the same OCA repository that displays your contact in a map, if
latitude and longitude are defined. (To define latitude and longitude,
refer to the Odoo module base_geolocalize)
A marker will be displayed for each item that has a localization.

If user zooms out, the markers will overlap, which won't be very visible.
In that case, nearby markers are grouped together, thanks to
Leaflet.markercluster plugin.

Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- route_planning, web_view_leaflet_map_partner
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 0
No views found for this module.
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
-
view_modeSelectionondelete={'leaflet_map': 'cascade'}selection_add=[('leaflet_map', 'Leaflet Map')]
No public methods.
-
typeSelectionselection_add=[('leaflet_map', 'Leaflet Map')]
No public methods.
No new fields.
Public methods (1)-
get_default_leaflet_position(self, model_name)@api.model
Loading…
Loading…
Loading…