Skip to content

fix(spp_security,spp_hazard): rename Hazard & Emergency to fix XML parse error#93

Closed
emjay0921 wants to merge 4 commits into19.0from
fix/hazard-category-ampersand-xml-parse
Closed

fix(spp_security,spp_hazard): rename Hazard & Emergency to fix XML parse error#93
emjay0921 wants to merge 4 commits into19.0from
fix/hazard-category-ampersand-xml-parse

Conversation

@emjay0921
Copy link
Copy Markdown
Contributor

Why is this change needed?

Odoo 19's ResUserGroupIdsField widget dynamically builds XML using category names as <group string="..."> attributes but does not escape special characters. The & in "Hazard & Emergency" causes an XML parse error (OwlError) when opening the Access Rights tab on the User form, specifically when spp_mis_demo_v2 is installed.

How was the change implemented?

Renamed the category from "Hazard & Emergency" to "Hazard and Emergency" in:

  • spp_security/security/categories.xml — category definition
  • spp_hazard/views/menu.xml — top-level application menu
  • spp_hazard/security/compliance.yaml — compliance spec

New unit tests

Unit tests executed by the author

How to test manually

  1. Install spp_mis_demo_v2 module
  2. Go to Settings > Users & Companies > Users
  3. Open any user and click the "Access Rights" tab
  4. Verify it loads without an OwlError

Related links

…parse error

Odoo 19's ResUserGroupIdsField widget inserts category names into
dynamically generated XML without escaping special characters. The &
in "Hazard & Emergency" breaks the XML parser when opening the Access
Rights tab on the User form.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.46%. Comparing base (839f83e) to head (081bbfc).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             19.0      #93      +/-   ##
==========================================
+ Coverage   70.39%   70.46%   +0.06%     
==========================================
  Files         674      695      +21     
  Lines       37005    38670    +1665     
==========================================
+ Hits        26051    27247    +1196     
- Misses      10954    11423     +469     
Flag Coverage Δ
fastapi 84.21% <ø> (ø)
spp_aggregation 85.06% <ø> (ø)
spp_alerts 94.08% <ø> (ø)
spp_api_v2 79.96% <ø> (ø)
spp_api_v2_change_request 60.29% <ø> (ø)
spp_api_v2_cycles 71.12% <ø> (ø)
spp_api_v2_data 64.41% <ø> (ø)
spp_api_v2_entitlements 70.19% <ø> (ø)
spp_api_v2_gis 71.52% <ø> (ø)
spp_api_v2_products 66.27% <ø> (ø)
spp_api_v2_service_points 70.94% <ø> (ø)
spp_api_v2_simulation 69.61% <ø> (ø)
spp_api_v2_vocabulary 57.26% <ø> (ø)
spp_area 79.26% <ø> (?)
spp_area_hdx 81.43% <ø> (ø)
spp_base_common 90.26% <ø> (ø)
spp_programs 45.51% <ø> (ø)
spp_security 66.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 21 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.

@emjay0921 emjay0921 closed this Mar 12, 2026
@emjay0921 emjay0921 deleted the fix/hazard-category-ampersand-xml-parse branch March 12, 2026 06:14
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