fix(spp_security,spp_hazard): rename Hazard & Emergency to fix XML parse error#93
Closed
fix(spp_security,spp_hazard): rename Hazard & Emergency to fix XML parse error#93
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why is this change needed?
Odoo 19's
ResUserGroupIdsFieldwidget 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 whenspp_mis_demo_v2is installed.How was the change implemented?
Renamed the category from "Hazard & Emergency" to "Hazard and Emergency" in:
spp_security/security/categories.xml— category definitionspp_hazard/views/menu.xml— top-level application menuspp_hazard/security/compliance.yaml— compliance specNew unit tests
Unit tests executed by the author
How to test manually
spp_mis_demo_v2moduleRelated links