Skip to content

[19.0][MIG] base_geoengine: migrate to 19.0#446

Open
leNeo wants to merge 472 commits intoOCA:19.0from
leNeo:19.0
Open

[19.0][MIG] base_geoengine: migrate to 19.0#446
leNeo wants to merge 472 commits intoOCA:19.0from
leNeo:19.0

Conversation

@leNeo
Copy link
Copy Markdown

@leNeo leNeo commented Mar 16, 2026

Summary

  • Migrate base_geoengine module to Odoo 19.0
  • Migrate JavaScript frontend from legacy widgets to OWL/ESM architecture
  • Update bundled libraries: OpenLayers 10.5.0, Chroma.js 3.1.2, Geostats 2.1.0
  • Refactor domain handling with monkey-patching for Odoo 19 ORM compatibility (geo operators integration)
  • Fix OCA compliance issues found during pre-publication review

Changes in this PR

OCA Compliance fixes

  • models/__init__.py: Replace old-style verbose GPL header with standard OCA # Copyright / # License AGPL-3.0 format
  • __init__.py (root): Add missing license header
  • domains.py: Add missing license header
  • readme/HISTORY.md: Add 19.0.1.0.1 changelog entry
  • readme/INSTALL.md: Fix RST syntax (.. code-block:: bash) mixed with Markdown, fix typo "documenation"
  • readme/DESCRIPTION.md: Fix typo "PostgGIS" → "PostGIS"
  • readme/CONTRIBUTORS.md: Remove empty email brackets for contributor entry
  • expressions.py: Replace Python 3.10+ match/case with dict-based dispatch for pre-commit compatibility

Core migration (already done before this PR)

  • JavaScript migrated to ESM modules (.esm.js) with OWL components
  • Domain system adapted for Odoo 19 ORM (DomainCondition monkey-patching)
  • fields.Field._condition_to_sql extended for geo operators
  • Tests updated to use add_to_registry / _setup_models__ (Odoo 19 API)

Pre-commit validation

All hooks pass: pre-commit run --all-files

  • oca-gen-addon-readme, prettier, eslint (0 errors), ruff, ruff-format, pylint_odoo, xml checks

Test plan

  • Install module on a fresh Odoo 19 database with PostGIS enabled
  • Run unit tests: odoo-bin -d test_db -i base_geoengine --test-enable --stop-after-init
  • Verify geoengine view loads correctly in backend
  • Test geo search operators (intersect, contains, within, touch, greater, lesser, equal)
  • Verify raster and vector layer configuration works

@leNeo leNeo mentioned this pull request Mar 16, 2026
1 task
@zamberjo
Copy link
Copy Markdown
Member

zamberjo commented Apr 1, 2026

Nice work, thanks for taking care of the 19.0 migration 🙌

Small suggestion before merge: could you please redo it following the official OCA migration steps so the full commit history from 18.0 is preserved?

Also, could you include PR #449 in this migration as well so 19.0 stays aligned with the previous stable branch?

Thanks!

yvaucher and others added 28 commits April 5, 2026 20:41
…lways need to zoom out to get useful informations
Implement propotional
Improve alpha channel management (everythong is ready to enable its configuration on the raster layer)
mymage and others added 23 commits April 5, 2026 20:41
Currently translated at 100.0% (168 of 168 strings)

Translation: geospatial-17.0/geospatial-17.0-base_geoengine
Translate-URL: https://translation.odoo-community.org/projects/geospatial-17-0/geospatial-17-0-base_geoengine/it/
Currently translated at 100.0% (168 of 168 strings)

Translation: geospatial-17.0/geospatial-17.0-base_geoengine
Translate-URL: https://translation.odoo-community.org/projects/geospatial-17-0/geospatial-17-0-base_geoengine/zh_CN/
…eble)

openlayers JS library (ol.js) could not be minified by Odoo minifier, because it is already minified.
Thus, load it separately without minification (do not include in bundle)
   Updated field label from "Params" to "Params WMS"
of params_wms
   attribute_field_id domain is updated to use values
based on geo_field_id.model_id
   Added edit button in popup of record shown in geoengine
view which allows user to edit values of record from
geoengine view.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: geospatial-18.0/geospatial-18.0-base_geoengine
Translate-URL: https://translation.odoo-community.org/projects/geospatial-18-0/geospatial-18-0-base_geoengine/
Currently translated at 100.0% (169 of 169 strings)

Translation: geospatial-18.0/geospatial-18.0-base_geoengine
Translate-URL: https://translation.odoo-community.org/projects/geospatial-18-0/geospatial-18-0-base_geoengine/it/
…dient customization

- Introduced `intermediate_colors` field to `geoengine.vector.layer` model, allowing users to specify comma-separated hex color values for intermediate gradient stops.
- Updated the GeoengineRenderer to utilize the new field for dynamic gradient generation.
- Modified relevant views and documentation to reflect the new feature.
- Version bump to 19.0.1.0.1
- JS modernization: ESM modules, OWL components
- Library updates: OpenLayers 10.5.0, Chroma.js 3.1.2, Geostats 2.1.0
- ORM compatibility: monkey-patch Field._condition_to_sql for geo operators
- Add domains.py for extended domain handling with geo operators
- OCA compliance: license headers, readme updates, typo corrections
- Replace deprecated Python 3.10+ syntax for compatibility
- Update tests with add_to_registry pattern

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… renderer

Add geoengine_swisstopo module providing:
- proj4js support for non-standard SRIDs (EPSG:2056, EPSG:21781, etc.)
- Swisstopo raster layer type for Swiss national map backgrounds
- Automatic SRID detection from geo fields for correct projection handling
- Patched GeoEngine renderer for multi-projection workflows
- CI config update for PostGIS-enabled PostgreSQL image

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leNeo
Copy link
Copy Markdown
Author

leNeo commented Apr 5, 2026

Hi @zamberjo, thanks for the review and the useful feedback!

I've reworked the PR following the official OCA migration steps:

  • Full 18.0 history preserved: Used git format-patch / git am from upstream/18.0 onto upstream/19.0, so all commit history is intact (468 commits).
  • PR feat(geoengine.vector.layer): add intermediate_colors field for gradient customization #449 included: Cherry-picked your intermediate_colors feature (b444282) so 19.0 stays aligned with 18.0.
  • Migration commit: Applied all 19.0 changes (version bump, JS/OWL modernization, ORM compat, library updates) as a proper [MIG] commit on top.
  • geoengine_swisstopo: Added as a separate commit.

CI is green. Let me know if anything else needs adjusting!

Copy link
Copy Markdown
Member

@zamberjo zamberjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The geoengine_swisstopo module should be in a separate pull request

services:
postgres:
image: postgres:13
image: postgis/postgis:14-3.5
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is defined in the template and should not be modified manually.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. base_geoengine requires PostGIS for its test database.
The module already creates the extension in its pre-init hook, but that only works if the PostgreSQL service image has PostGIS installed.
Since .github/workflows/test.yml is template-managed, what is the preferred OCA way to handle this for the repository? Should this be done through the template/repo configuration instead of a manual workflow change?

remove geoengine_swisstopo from [19.0][MIG] base_geoengine: migrate to 19.0#446 and submit it in a separate PR for the geoengine_swisstopo module.
@leNeo
Copy link
Copy Markdown
Author

leNeo commented Apr 7, 2026

The geoengine_swisstopo module should be in a separate pull request
Thanks, agreed. I’remove geoengine_swisstopo from [19.0][MIG] base_geoengine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.