Skip to content

fix(spp_gis): own the GIS Configuration menu so Raster + Data Layer are reachable#189

Draft
emjay0921 wants to merge 3 commits into19.0from
fix/988-spp-gis-deps-raster-datalayer
Draft

fix(spp_gis): own the GIS Configuration menu so Raster + Data Layer are reachable#189
emjay0921 wants to merge 3 commits into19.0from
fix/988-spp-gis-deps-raster-datalayer

Conversation

@emjay0921
Copy link
Copy Markdown
Contributor

Why is this change needed?

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.

Refs OP#988.

How was the change implemented?

Moved 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 now 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

New unit tests

None — pure menu-XML reorganization.

Unit tests executed by the author

Manual verification on a clean instance: install spp_gis and confirm the three submenus render under Settings → GIS Configuration; layer on spp_gis_indicators and confirm the two additional submenus join the same root in correct sequence.

How to test manually

  1. On a clean instance, install only spp_gis.
  2. Navigate to Settings → GIS Configuration. Confirm three submenus appear: Raster Layers, Data Layers, Color Schemes.
  3. Open each submenu form and confirm records can be created/edited.
  4. Now install spp_gis_indicators.
  5. Navigate to Settings → GIS Configuration. Confirm two additional submenus appear at the bottom: Indicator Layers, Color Scales.
  6. Confirm the order: Raster Layers → Data Layers → Color Schemes → Indicator Layers → Color Scales.

Related links

OP#988 — QA passed Round 1.

…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
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.50%. Comparing base (0627ab1) to head (3f6e86f).
⚠️ Report is 21 commits behind head on 19.0.

Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
spp_api_v2_gis 71.52% <ø> (ø)
spp_area_hdx 81.43% <ø> (ø)
spp_base_common 90.26% <ø> (ø)
spp_dci_demo 69.23% <ø> (ø)
spp_drims 79.55% <ø> (ø)
spp_drims_sl_demo 68.33% <ø> (-0.58%) ⬇️
spp_farmer_registry 88.61% <ø> (+0.31%) ⬆️
spp_farmer_registry_cr 61.15% <ø> (+0.05%) ⬆️
spp_farmer_registry_demo 54.01% <ø> (+0.62%) ⬆️
spp_gis 74.09% <ø> (ø)
spp_gis_indicators 91.07% <ø> (ø)
spp_gis_report 82.60% <ø> (ø)
spp_gis_report_programs 97.05% <ø> (?)
spp_hazard 99.59% <ø> (ø)
spp_hazard_programs 97.14% <ø> (ø)
spp_hxl_area 63.74% <ø> (ø)
spp_irrigation 95.45% <ø> (ø)
spp_land_record 98.55% <ø> (ø)
spp_programs 64.54% <ø> (+0.05%) ⬆️
spp_security 66.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
spp_gis/__manifest__.py 0.00% <ø> (ø)
spp_gis_indicators/__manifest__.py 0.00% <ø> (ø)

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread spp_gis_indicators/views/menu.xml Outdated
Comment on lines +1 to +11
<?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 />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

@emjay0921 emjay0921 marked this pull request as draft May 7, 2026 06:18
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.

1 participant