-
-
Notifications
You must be signed in to change notification settings - Fork 303
Description
Description:
In Odoo 18, the OpenLayers JS/CSS have been moved into assets (see base_geoengine/manifest.py
).
When creating a custom module in standard mode, these assets are not loaded, and we get the following error in the browser console:
Uncaught (in promise) ReferenceError: ol is not defined
This happens because the OpenLayers bundle is not part of the custom module’s assets by default.
However, if we run the instance with ?debug=assets, everything works fine, since all files are included individually.
We can see the same error during the migration of the demo module (cf. PR #406
).
Expected behavior:
OpenLayers should be available automatically to any module that depends on base_geoengine, as in previous versions.
Possible solutions:
Include the OpenLayers bundle in web.assets_backend directly in base_geoengine, so all dependent modules get it. Or provide clear documentation/example on how to properly include the OpenLayers bundle in custom modules.
Environment:
Odoo version: 18.0
Module: base_geoengine
Browser console shows: ol is not defined