Repository navigation
[20.0][MIG] base_geoengine: Migration to 20.0 - #8
weinni2000 wants to merge 1 commit into
Conversation
Reviewer's GuideAPIExpose readable models with stored geo fields for indirect geo-domain selection, and register the GeoEngine view mode through the Odoo 20.0 action-view extension.
ImplementationAdapt domain SQL generation and indirect geo searches to the Odoo 20.0 TableSQL API while enforcing access domains and validating geo references.
Update geometry conversion, geo-field validation, and SQL helpers for the migrated ORM and safer input handling.
UIReplace the legacy geo-domain editor with Odoo 20.0 tree-editor integrations for geo operands, reference-model selection, and active-ID filters.
Migrate the GeoEngine view components, stores, panels, renderer, and map widget to the Odoo 20.0 OWL and web-client APIs.
Update map and legend styling for theme-aware colors and replace legacy controls with current icons.
ConfigurationSet the module version and access-file manifest entry for Odoo 20.0, and configure PostGIS-backed databases in copier answers and CI.
Replace the legacy model-access CSV with the Odoo 20.0 access definition file.
TestsCover indirect geo search behavior, invalid references, operator validation, and access restrictions under the migrated ORM.
Other changesFiles not grouped.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="base_geoengine/tests/test_model.py" line_range="751-755" />
<code_context>
+ "operation": "r",
+ },
+ {
+ "name": "dummy.zip read for admins (test)",
+ "model_id": model_zip.id,
+ "group_id": self.env.ref("base.group_system").id,
+ "operation": "r",
},
]
)
</code_context>
<issue_to_address>
**issue (testing):** The restricted test user is granted the custom `Geo Restricted` group, but the new `dummy.zip` model access is granted only to `base.group_system`. The restricted user's search therefore fails the model-level access check with an access error before the record-domain restriction can be evaluated, so the regression test no longer exercises record-rule behavior.
**Triggers:** When `test_geo_search_indirect_respects_record_rules` runs the search as the restricted user.
**Suggested fix:** Grant read access for `dummy.zip` to the restricted test group as well as to the administrator group, using separate non-overlapping access records.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and the change alters model and record-level authorization, including which groups can read geospatial records and how security domains are applied to indirect spatial queries; a mistake could expose records or grant access broadly without an obvious application failure. Reverting the code would not undo any data or access that was already exposed, and database-loaded access changes may require explicit cleanup.
Blocking findings: base_geoengine/tests/test_model.py:755
6b283ce to
16aea17
Compare
16aea17 to
8e99ffa
Compare
3d3344e to
44a8119
Compare
Assisted-by: Claude Code (claude-opus-5-5)
44a8119 to
f54f4f9
Compare
security/ir.model.access.csvtosecurity/ir.access.csv.Domain._to_sql/Field._condition_to_sqltake aTableSQL,check_field_accessis public, andQuery.add_where()getsSQLobjects (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 aValueError.domain_selector_active_idsand a reworkeddomain_selector_geo_field_input).Migrated with odev.
Assisted-by: Claude Code (claude-opus-5-5)
Summary by Sourcery
Migrate base_geoengine to Odoo 20.0 while preserving secure geospatial search and modernizing its map views and domain editing experience.
New Features:
Bug Fixes:
Enhancements:
Build:
Tests:
Chores: