fix(spp_gis): own the GIS Configuration menu so Raster + Data Layer are reachable#189
fix(spp_gis): own the GIS Configuration menu so Raster + Data Layer are reachable#189
Conversation
…re reachable Installing spp_gis alone left every Raster / Data Layer / Color Scheme action orphaned: spp_gis defines all three models, views and actions but shipped no `<menuitem>` records. The "GIS Configuration" root menu lived in spp_gis_indicators, so installing only spp_gis showed nothing under Settings, and installing spp_gis_indicators on top exposed only its own Indicator Layers and Color Scales submenus — Raster and Data Layer remained unreachable from the UI. Move ownership of the menu hierarchy back to spp_gis where the actions live. New `spp_gis/views/menu.xml` declares: - `menu_gis_config_root` — "GIS Configuration" under base.menu_administration (Settings), restricted to base.group_system - Raster Layers (seq 10), Data Layers (seq 20), Color Schemes (seq 30) spp_gis_indicators retargets its two submenus to `spp_gis.menu_gis_config_root` (Indicator Layers seq 40, Color Scales seq 50) and drops its now-duplicate root declaration. Net effect: - spp_gis alone → Settings → GIS Configuration → Raster Layers / Data Layers / Color Schemes appear immediately - spp_gis + spp_gis_indicators → also adds Indicator Layers + Color Scales under the same root, in deterministic order Refs OP#988.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #189 +/- ##
==========================================
- Coverage 71.63% 71.50% -0.13%
==========================================
Files 933 939 +6
Lines 55370 54889 -481
==========================================
- Hits 39664 39250 -414
+ Misses 15706 15639 -67
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request relocates the "GIS Configuration" root menu from the spp_gis_indicators module to the base spp_gis module. This change ensures that GIS configuration options are accessible even when only the base module is installed, preventing orphaned menu items. The PR includes version bumps for both modules and updates sub-menu parent references. Feedback was provided to remove a now-empty XML file in the indicators module to reduce unnecessary loading overhead.
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo> | ||
| <!-- GIS Configuration parent menu under Settings --> | ||
| <menuitem | ||
| id="menu_gis_config_root" | ||
| name="GIS Configuration" | ||
| parent="base.menu_administration" | ||
| sequence="780" | ||
| groups="base.group_system" | ||
| /> | ||
| </odoo> | ||
| <!-- | ||
| Root "GIS Configuration" menu used to live here, but installing | ||
| spp_gis alone left every Raster/Data Layer action orphaned because | ||
| the root was unreachable. The root is now declared in spp_gis | ||
| (which owns those actions) — see spp_gis/views/menu.xml. This | ||
| module's submenus reference it via `spp_gis.menu_gis_config_root`. | ||
| See OP#988. | ||
| --> | ||
| <odoo /> | ||
|
|
There was a problem hiding this comment.
This file is now effectively redundant as it contains no functional XML records. While the explanatory comment is helpful for context, keeping empty files that are still loaded via the manifest adds unnecessary overhead to the module loading process.
It is recommended to delete this file entirely and remove the corresponding entry "views/menu.xml" from the data list in spp_gis_indicators/__manifest__.py.
Why is this change needed?
Installing
spp_gisalone left every Raster / Data Layer / Color Scheme action orphaned.spp_gisdefines all three models, views, and actions but shipped no<menuitem>records. The GIS Configuration root menu lived inspp_gis_indicators, so installing onlyspp_gisshowed nothing under Settings, and installingspp_gis_indicatorson top exposed only its own Indicator Layers and Color Scales submenus — Raster and Data Layer remained unreachable from the UI.Refs OP#988.
How was the change implemented?
Moved ownership of the menu hierarchy back to
spp_giswhere the actions live.New
spp_gis/views/menu.xmldeclares:menu_gis_config_root— "GIS Configuration" underbase.menu_administration(Settings), restricted tobase.group_systemspp_gis_indicatorsnow retargets its two submenus tospp_gis.menu_gis_config_root(Indicator Layers seq 40, Color Scales seq 50) and drops its now-duplicate root declaration.Net effect:
spp_gisalone → Settings → GIS Configuration → Raster Layers / Data Layers / Color Schemes appear immediatelyspp_gis+spp_gis_indicators→ also adds Indicator Layers + Color Scales under the same root, in deterministic orderNew unit tests
None — pure menu-XML reorganization.
Unit tests executed by the author
Manual verification on a clean instance: install
spp_gisand confirm the three submenus render under Settings → GIS Configuration; layer onspp_gis_indicatorsand confirm the two additional submenus join the same root in correct sequence.How to test manually
spp_gis.spp_gis_indicators.Related links
OP#988 — QA passed Round 1.