Skip to content

[20.0][MIG] base_geoengine: Migration to 20.0 - #489

Open
weinni2000 wants to merge 101 commits into
OCA:20.0from
weinni2000:20.0-mig-base_geoengine
Open

weinni2000 wants to merge 101 commits into
OCA:20.0from
weinni2000:20.0-mig-base_geoengine

Conversation

@weinni2000

Copy link
Copy Markdown
  • Convert security/ir.model.access.csv to security/ir.access.csv.
  • Adapt the geo operators to the 20.0 ORM: Domain._to_sql / Field._condition_to_sql take a TableSQL, check_field_access is public, and Query.add_where() gets SQL objects (SQL.identifier) instead of raw strings.
  • where_calc() applies _access_domain("read"), so access rules also restrict the indirect geo sub-queries ({'model.geo_field': domain}); invalid or empty geo references now raise a ValueError.
  • Rewrite the geo domain selector widgets for the 20.0 domain editor (the old field-input / number-field components are replaced by domain_selector_active_ids and a reworked domain_selector_geo_field_input).
  • Adapt the OWL components of the geoengine view (controller, renderer, layers / records panels, search bar, edit map widget) to the 20.0 web client.

Depends on the 19.0 migration #465 (this branch is based on it).

Migration changes only (diff after the pre-commit auto fixes): weinni2000#8

Migrated with odev.

Assisted-by: Claude Code (claude-opus-5-5)

kouffsamuel and others added 30 commits September 29, 2026 09:04
Before this change, simple geometry column were created without inforamtion regarding the geo type nor the defined SRID. Without these information, the srid has to be expliciltely set when converting data to column format.
…had to be use. Add the possibility to have a right internal domain on the right
…method with our alias to perform search method and fix tests
OCA-git-bot and others added 12 commits September 29, 2026 09:04
Update the geometry string parsing logic to automatically attempt WKB hex loading even if the WKB flag is not explicitly set. This handles cases where a hex string is provided but treated as WKT, falling back to WKT parsing only if hex validation fails.
Upgrades external libraries Chroma.js, Geostats, and OpenLayers to newer versions to ensure compatibility and leverage recent improvements. This includes transition to new folder structures for versioned assets.
Moves OpenLayers, Chroma.js, and Geostats out of the standard asset bundle to a dedicated dynamic loading utility. This centralization prevents potential bundler conflicts and ensures libraries are loaded asynchronously only when required. Updates the GeoEngine renderer and map edit widget to utilize this shared loader for dependency initialization.
   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
The 19.0 migration replaced `_apply_ir_rules` (removed in 19.0) by
`_check_field_access`, which no longer applied row-level security
(ir.rule) to the spatial sub-query of indirect geo operators. As a
result a restricted user could match related records they are not
allowed to read.

Re-apply record rules in `where_calc`, mirroring `BaseModel._search`,
and add a regression test with a non-admin user and an ir.rule.
…(Odoo 19)

res.users.groups_id was renamed to group_ids in Odoo 19, which made
test_geo_search_indirect_respects_record_rules fail with
'Invalid field groups_id in res.users'. Also bump manifest to 19.0.1.0.2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@oca-cla-bot

oca-cla-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@weinni2000
weinni2000 force-pushed the 20.0-mig-base_geoengine branch from 16aea17 to 8e99ffa Compare November 1, 2026 09:30
@weinni2000

Copy link
Copy Markdown
Author

@OSevangelist:
I don't know who to write to, so I'm writing to you

Does OCA CLA Bot write the contributors without a CLA directly or do i have to send them a message to get my PR trough?
What's the process if one contributor is not active anymore or not reponsive?

image

@weinni2000

Copy link
Copy Markdown
Author

@leNeo:
Could you review this PR?

@weinni2000

Copy link
Copy Markdown
Author

Hi @cormaza @juppe @Sanazzzmi @kouffsamuel, your earlier commits are part of this migration, and the CLA check fails for chris.ormaza@gmail.com, johan@ahkio.com, sanazzz246@gmail.com and samuel.kouff@hotmail.com. Could you sign at https://clabot.odoo-community.org/ (or have them added to your company's CLA)? Thanks!

@leNeo

leNeo commented Nov 6, 2026

Copy link
Copy Markdown

Hi @weinni2000, I proposed a few improvements on top of this PR in weinni2000#13: spatial domains through Odoo 20's operator_optimization API instead of monkey patches, a geo_equal SRID fix, stricter validation of indirect references (with six new tests), plus two front fixes ("Invalid domain" on indirect conditions, and a layer without values aborting the map rendering). Feel free to cherry-pick what suits you.

🤖 Generated with Claude Code

@weinni2000
weinni2000 force-pushed the 20.0-mig-base_geoengine branch 2 times, most recently from 3d3344e to 44a8119 Compare November 10, 2026 08:29
Assisted-by: Claude Code (claude-opus-5-5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.