Skip to content

fix(spp_registry): fix Registrant Tags EvalError on ref() in context#155

Open
emjay0921 wants to merge 1 commit into19.0from
fix/registrant-tags-eval-error
Open

fix(spp_registry): fix Registrant Tags EvalError on ref() in context#155
emjay0921 wants to merge 1 commit into19.0from
fix/registrant-tags-eval-error

Conversation

@emjay0921
Copy link
Copy Markdown
Contributor

Why is this change needed?

Navigating to Studio > Settings > Registrant Tags throws EvalError: Name 'ref' is not defined. The ref() function in the action's context field is evaluated client-side in Odoo 19 where it's not available.

How was the change implemented?

Moved ref() from the field body to the eval attribute, which is processed server-side during XML data loading where ref() is available.

New unit tests

N/A — XML data fix

How to test manually

  1. Go to Studio > Settings > Registrant Tags
  2. Should open without error
  3. Create a new tag — should default to correct vocabulary

Related links

The Registrant Tags action used ref() in the context field body which is
evaluated client-side in Odoo 19 where ref() is not available. Move to
eval attribute which is processed server-side during XML loading.

Fixes #879
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 updates the context field in the spp_registry/views/tags_view.xml file to use the eval attribute instead of a text-based dictionary definition. This is a standard improvement in Odoo-style XML views to ensure the context dictionary is correctly evaluated as a Python expression. I have no feedback to provide as there were no review comments to assess.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.33%. Comparing base (aaa9001) to head (bec75cd).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             19.0     #155   +/-   ##
=======================================
  Coverage   71.33%   71.33%           
=======================================
  Files         932      938    +6     
  Lines       54975    54997   +22     
=======================================
+ Hits        39217    39234   +17     
- Misses      15758    15763    +5     
Flag Coverage Δ
spp_analytics 93.13% <ø> (ø)
spp_api_v2 80.10% <ø> (ø)
spp_api_v2_change_request 66.85% <ø> (ø)
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 71.12% <ø> (ø)
spp_api_v2_vocabulary 57.26% <ø> (ø)
spp_approval 50.29% <ø> (ø)
spp_area 79.26% <ø> (ø)
spp_area_hdx 81.43% <ø> (ø)
spp_audit 72.60% <ø> (ø)
spp_banking 80.00% <ø> (?)
spp_base_common 90.26% <ø> (ø)
spp_base_setting 50.00% <ø> (?)
spp_programs 62.23% <ø> (ø)
spp_security 66.66% <ø> (ø)

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

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