Skip to content

fix(spp_graduation): expose Graduation Criteria via menu + standalone views#190

Draft
emjay0921 wants to merge 1 commit into19.0from
fix/990-graduation-criteria-menu
Draft

fix(spp_graduation): expose Graduation Criteria via menu + standalone views#190
emjay0921 wants to merge 1 commit into19.0from
fix/990-graduation-criteria-menu

Conversation

@emjay0921
Copy link
Copy Markdown
Contributor

Why is this change needed?

The spp.graduation.criteria model shipped with the module along with ACL entries and the criteria_ids One2many on spp.graduation.pathway, but had no menu, no action_window, and no standalone list/form views. Users could only edit criteria indirectly through the embedded list on the pathway form — the documented Graduation > Graduation Criteria nav path resolved to nothing.

Refs OP#990.

How was the change implemented?

1. New view file spp_graduation/views/graduation_criteria_views.xml: list, form, and search views plus an action_graduation_criteria action_window. The search view groups by pathway and assessment method, filters required vs optional, and surfaces the archived flag.

2. Menu wiring in views/graduation_menus.xml: new menu_graduation_criteria as a direct child of menu_graduation_root (sequence 20, between Assessments and Configuration), gated on group_spp_graduation_user per the OP's suggested fix.

3. Manifest + HISTORY: new view file added to the data list, version bumped 19.0.2.0.0 → 19.0.2.0.1.

New unit tests

None — pure view/menu wiring; no model changes.

Unit tests executed by the author

Manual verification on a running instance: upgraded spp_graduation, confirmed the new "Graduation Criteria" menu appears as a direct child of Graduation (between Assessments and Configuration), opened the list/form, created a record, exercised the Required / Optional / Archived filters and the Group By options, and verified the existing weight > 0 ValidationError still fires from the form.

How to test manually

  1. Pull the branch and upgrade spp_graduation (XML-only round, no full reset needed).
  2. Top-left app switcher → Graduation → confirm the left nav now reads: Assessments → Graduation Criteria (new) → Configuration.
  3. Click Graduation Criteria → list opens with columns Name / Code / Pathway / Assessment Method / Weight / Is Required / Active.
  4. Open any record → form shows Name (h1), Code, Pathway, Sequence, Assessment Method, Weight, Is Required toggle, Description.
  5. Create a new record with Weight = 0 → confirm the Weight must be greater than zero validation fires.
  6. Verify the menu is visible to users with the Graduation User role (not just Manager) — ACL was already permissive for the model.

Related links

OP#990 — QA passed Round 1.

… views

The model `spp.graduation.criteria` shipped with the module along with
ACL entries and the `criteria_ids` One2many on `spp.graduation.pathway`,
but had no menu, no action_window, and no standalone list/form views.
Users could only edit criteria indirectly through the embedded list on
the pathway form — the documented `Graduation > Graduation Criteria`
nav path resolved to nothing.

- Add `views/graduation_criteria_views.xml` with list, form, and search
  views plus an `action_graduation_criteria` action_window. The search
  view groups by pathway and assessment_method, filters required vs
  optional, and surfaces the archived flag.
- Wire a `Graduation Criteria` menuitem as a direct child of
  `menu_graduation_root` (sequence 20, between Assessments and
  Configuration), gated on `group_spp_graduation_user` per the OP
  suggested fix.
- Bump 19.0.2.0.0 → 19.0.2.0.1 + HISTORY entry.

Refs OP#990.
@emjay0921 emjay0921 marked this pull request as draft May 7, 2026 04:29
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.72%. Comparing base (32a5c78) to head (4fd3ac9).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             19.0     #190      +/-   ##
==========================================
+ Coverage   71.69%   71.72%   +0.02%     
==========================================
  Files         942      942              
  Lines       55561    55600      +39     
==========================================
+ Hits        39835    39879      +44     
+ Misses      15726    15721       -5     
Flag Coverage Δ
spp_base_common 90.26% <ø> (ø)
spp_case_graduation 97.77% <ø> (ø)
spp_graduation 99.24% <ø> (+5.63%) ⬆️
spp_programs 64.77% <ø> (ø)
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_graduation/__manifest__.py 0.00% <ø> (ø)

... and 3 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 introduces a user interface for managing graduation criteria by adding search, list, and form views for the spp.graduation.criteria model. It also includes a new menu item and action to make these criteria accessible to users. The module version has been incremented to 19.0.2.0.1, and the history file has been updated accordingly. I have no feedback to provide.

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