Conversation
Odoo 19 no longer supports 'tree' in view_mode for act_window actions. Changed to 'list,form' to fix "View types not defined tree" error.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical compatibility issue with Odoo 19 by adjusting the view mode definitions for GIS configuration actions. The change ensures that users can access Indicator Layers and Color Scales without encountering errors related to deprecated view types, thereby maintaining the functionality of these modules in the updated Odoo environment. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses a compatibility issue with Odoo 19 by replacing the deprecated tree view mode with list in the ir.actions.act_window records for color scales and indicator layers. The changes in color_scale_views.xml and indicator_layer_views.xml are accurate and resolve the described error. The implementation is correct and no issues were found.
Note: Security Review has been skipped due to the limited scope of the PR.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 19.0 #89 +/- ##
==========================================
+ Coverage 69.67% 69.91% +0.24%
==========================================
Files 666 674 +8
Lines 36682 37005 +323
==========================================
+ Hits 25558 25872 +314
- Misses 11124 11133 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…ixes spp_cel_vocabulary: - Promote to Beta - Rename display_name to label in concept group definitions - Remove unused semantic helpers (is_caregiver, is_mother, is_father) - Replace f-string logging with lazy % formatting spp_gis_indicators: - Promote to Beta - Add spp_security dependency - Rewrite data_layer with choropleth validation constraint - Add _get_choropleth_config() override for indicator-based config - Fix None value handling in legend generation - Improve tests with shared helper and 3 new test cases
spp_cel_vocabulary (34 new tests): - _ensure_concept_groups() idempotency and completeness - _ensure_registered() lazy registration mechanism - head() function: missing code, _membership/_group params, fallbacks - VocabularyCache.clear() reset behavior - Translator error paths: unknown helpers, empty groups, unsupported ops - code() function edge cases with falsy values - post_init_hook() integration spp_gis_indicators (27 new tests): - Quantile breaks: empty values, few unique values - Legend HTML: empty breaks, missing color scale - get_feature_colors(): no indicators, None values, value=0, boundaries - _get_indicator_values(): incident filter, empty period - _compute_break_values(): no data, unknown classification - Color scale: diverging edge cases, exact boundaries - colors_json validation: empty string, short hex
…RIPTION Markdown tables in DESCRIPTION.md cause RST column width differences between local and CI versions of oca-gen-addon-readme. Using bullet lists avoids the issue entirely.
…tch coverage Add targeted tests to cover changed lines in: - data_layer.py: _get_choropleth_config and _check_choropleth_config using new() records - cel_vocabulary_translator.py: error paths for field resolution, eval, and code lookup - indicator_layer.py: get_feature_colors with zero and positive values
Why is this change needed?
Promote spp_cel_vocabulary and spp_gis_indicators from Alpha to Beta, with bug fixes and code quality improvements.
How was the change implemented?
spp_cel_vocabulary:
display_nametolabelin concept group definitionsis_caregiver,is_mother,is_father)%formattingspp_gis_indicators:
spp_securitydependencyview_modefromtree,formtolist,form(Odoo 19 compatibility)data_layer.pywith choropleth validation constraint_get_choropleth_config()override for indicator-based configNonevalue handling in legend generationNew unit tests
test_choropleth_requires_config— validates choropleth without config raises errortest_get_choropleth_config_indicator— validates indicator-based choropleth configtest_get_choropleth_config_basic— validates basic layers return no choropleth configUnit tests executed by the author
How to test manually
Related links