[19.0][MIG] base_geoengine#459
Open
Jonasaaaa wants to merge 553 commits into
Open
Conversation
Add note about geometry fields to be listed in geoengine view definitions
Fix some linting issues
It prevents closed cursor errors, most likely dued to using a mock in the tests.
This allow to declare a Geo field using fields instead of having to import them directly from geoengine module.
With this import of GeoModel is not needed anymore giving to all classes the ability to have geo fields.
Using geo fields on AbstractModels is made possible.
… plus fix some typos
EPSG:3857 is the official name for the spherical pseudo-mercator coordinate system. The unofficial 900913 code is deprecated and should not be used as the default anymore.
Deprecated in OpenLayers >3
Change fit(extent) as map size is not necessary anymore. And improve the test on extent, to not try to fit extent when no features are defined.
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.
- rename folder to follow odoo and OCA conventions, regarding views definition - isolate leaflet_map_view code - isolate leaflet_map_controller code - isolate leaflet_map_renderer code - split xml file into renderer and controller part - apply Odoo SA convention [FIX] remove useless logs, and put a single one in debug level - remove useless code - remove obsolete directive: control-panel-bottom-right [IMP] web_view_leaflet_map: introduce 'Create' Button
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: geospatial-18.0/geospatial-18.0-web_view_leaflet_map Translate-URL: https://translation.odoo-community.org/projects/geospatial-18-0/geospatial-18-0-web_view_leaflet_map/
Currently translated at 100.0% (6 of 6 strings) Translation: geospatial-18.0/geospatial-18.0-web_view_leaflet_map Translate-URL: https://translation.odoo-community.org/projects/geospatial-18-0/geospatial-18-0-web_view_leaflet_map/it/
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/
Switch GeoOperator helpers and _geo_condition_to_sql to build odoo.tools.SQL objects with SQL.identifier-quoted aliases/columns, instead of f-string concatenation plus an out-parameter params list. Drop redundant guards in _geo_condition_to_sql now that @operator_optimization + the GeoField filter in _optimize_geo_condition already guarantee both invariants. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…olumn ``convert_to_cache`` stores geometries as hex-encoded WKB (``value.wkb_hex``). When the ORM later flushes a write, it forwards that cached hex string to ``convert_to_column``, which previously passed it straight to ``entry_to_shape`` → ``value_to_shape``. There the string was loaded with ``wkt.loads`` (use_wkb=False), raising ``shapely.errors.GEOSException: ParseException: Unknown type``. Detect hex strings in ``convert_to_column`` and decode them via ``load_geo`` (which already handles hex WKB) before forwarding to ``entry_to_shape``. Other input types (geojson, WKT, BaseGeometry) go through the existing path unchanged. Reproduces by setting a GeoPoint field from a computed value (e.g. ``fields.GeoPoint.from_latlon``) and flushing; without this fix the first write fails on ``shapely.errors.GEOSException``.
Odoo 19's ``RelationalModel._getNextConfig`` calls ``config.groupBy.map(...)``
unconditionally, so ``groupBy`` must be an Array. The geoengine
renderer's ``loadView`` was passing ``groupBy: {}`` (object literal),
producing on first render:
TypeError: config.groupBy.map is not a function
at RelationalModel._getNextConfig
at GeoengineRenderer.loadView
at GeoengineRenderer.loadVectorModel
Reproduces by opening any geoengine view in Odoo 19.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration of the
geospatialrepository (5 modules) from 18.0 to 19.0.Modules migrated:
Main changes in
base_geoengine:BaseModel._condition_to_sqlby an@operator_optimizationhook returning aDomain.custom(to_sql=...).odoo.tools.SQLwithSQL.identifier(...)for proper alias/column quoting.odoo.osv.expression.AND→odoo.fields.Domain.ANDinBase.geo_search.The remaining four modules only required manifest version bumps; their
JS already uses
@odoo/owlimports introduced in 17.0/18.0.