Skip to content

[MIG] base_geoengine: Migrated to 19.0#414

Open
weinni2000 wants to merge 99 commits into
OCA:19.0from
weinni2000:19.0-mig-base_geoengine
Open

[MIG] base_geoengine: Migrated to 19.0#414
weinni2000 wants to merge 99 commits into
OCA:19.0from
weinni2000:19.0-mig-base_geoengine

Conversation

@weinni2000

Copy link
Copy Markdown

Major points:

  • moved the _condition_to_sql to the change classes, dealt with the changed function signatures etc
  • created the new optimization functions for geospatial fields which are necessary in odoo19
  • Standardize translation calls to use env._ and minor odoo 19 syntax

weinni2000 and others added 30 commits October 4, 2025 11:54
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
@weinni2000

Copy link
Copy Markdown
Author

Here are the same changes against an integration branch to see the changes:
weinni2000#4

@weinni2000 weinni2000 changed the title 19.0 mig base geoengine [MIG] base_geoengine: Migrated to 17.0 Oct 4, 2025
@weinni2000 weinni2000 changed the title [MIG] base_geoengine: Migrated to 17.0 [MIG] base_geoengine: Migrated to 19.0 Oct 4, 2025
@weinni2000 weinni2000 force-pushed the 19.0-mig-base_geoengine branch from 5c4fead to 07b65c6 Compare October 29, 2025 17:12
@weinni2000

Copy link
Copy Markdown
Author

I refactored it to not use odoo-test-helpers anymore (which was not working in odoo19).
See discussion: OCA/odoo-test-helper#34
Now everything is green

@juppe

juppe commented Feb 23, 2026

Copy link
Copy Markdown

Any updates on when this PR might be merged?

@weinni2000

Copy link
Copy Markdown
Author

It needs 2 reviews to be dealt with by the maintainers.

There is still an issue in the code which is not covered from the test. But I was hoping somebody else smarter than me is fixing it ;). So you are welcome to review fix it.

@yvaucher

Copy link
Copy Markdown
Member

Hello @weinni2000 thanks for the work done here.

Can you add the following commits that just were FW from version 16.0 to 17.0 and 18.0 ?

#431

@juppe

juppe commented Mar 6, 2026

Copy link
Copy Markdown

It needs 2 reviews to be dealt with by the maintainers.

There is still an issue in the code which is not covered from the test. But I was hoping somebody else smarter than me is fixing it ;). So you are welcome to review fix it.

@weinni2000 I have been testing your branch in version 19.0 for a few weeks. I made a pull request to your fork fixing some errors that I have run into. In addition to fixing the errors, I have also updated the OpenLayers, Chroma.js, Geostats JS libraries.

weinni2000#7

ps. I also cherry-picked in the commits from #431

@leNeo

leNeo commented Jun 26, 2026

Copy link
Copy Markdown

Hi @weinni2000 and @juppe,

Thanks for all the work on the 19.0 migration. Right now the effort is spread across three places: this PR (#414), @juppe's follow-up (weinni2000/geospatial#7 — JS lib upgrades, the #431 forward-ports and a WKT/WKB fix), and my own #446, which largely duplicates the same improvements.

To stop the fragmentation, I'd like to take over and consolidate everything into a single clean PR:

  • base = this migration ([MIG] base_geoengine: Migrated to 19.0 #414),
  • the improvements from PR#7 (lib upgrades, [18.0][FW] base_geoengine: multiple ports from 16.0 #431 ports, WKB detection),
  • a few fixes, notably a record-rule (ir.rule) regression on the indirect geo-operators: in expressions.py, self._apply_ir_rules(rel_query, "read") was replaced by model._check_field_access(current_field, "read"), which no longer applies row-level security to the spatial sub-query (only visible for non-admin users, so the current tests don't catch it). I'll add a test for it.

That single PR would supersede #414, #446 and PR#7, so all three can be closed and we keep one clean history. I'll credit you both as Co-authored-by, of course.

@weinni2000 you already offered to close #414 in favour of a consolidated PR, so this should match what you had in mind. Does this work for you both? @cparadis-impressfoods — since you tested PR#7, a review on the consolidated PR would be very welcome.

@weinni2000

Copy link
Copy Markdown
Author

@leNeo: thanks for taking over much appreciated.

leNeo added a commit to leNeo/geospatial that referenced this pull request Jun 27, 2026
- base_geoengine OCA PR is now OCA#465 (consolidated): OCA#414 + juppe's PR#7
  improvements + ir.rule security fix. OCA#446 closed (superseded).
- swisstopo/drone now wait on OCA#465 merge.
- §8.3: document the ir.rule regression on indirect geo-operators and its fix.
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.