Repository navigation
[18.0][ADD] web_theme_color: add new module - #7
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 18.0 #7 +/- ##
==========================================
+ Coverage 82.40% 89.18% +6.78%
==========================================
Files 13 19 +6
Lines 250 370 +120
Branches 26 33 +7
==========================================
+ Hits 206 330 +124
+ Misses 35 29 -6
- Partials 9 11 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
It contains a functional edge-case in the ir.config_parameter.write() hook and documentation rendering issues (wrapped/broken parameter keys) that should be corrected before merge.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new Odoo 18 addon (web_theme_color) that lets administrators change the backend brand color via system parameters by rewriting SCSS primary variables and triggering asset rebuilds.
Changes:
- Introduces system parameters (
web_theme_color.primary,web_theme_color.primary_dark) and hooksir.config_parameterto apply changes on create/write/unlink. - Adds SCSS primary variable files (normal + dark) and prepends them into the relevant web asset bundles.
- Adds generated module documentation (README fragments, README.rst, and static description page).
File summaries
| File | Description |
|---|---|
| web_theme_color/init.py | Initializes the addon Python package. |
| web_theme_color/manifest.py | Declares addon metadata, dependencies, data, and asset bundle injections. |
| web_theme_color/data/ir_config_parameter.xml | Creates the two system parameters with default values. |
| web_theme_color/models/init.py | Loads the addon models. |
| web_theme_color/models/ir_config_parameter.py | Hooks config parameter lifecycle events to trigger theme SCSS rewrite/reset. |
| web_theme_color/models/web_theme_color.py | Validates color format and rewrites/resets SCSS assets via web_editor.assets. |
| web_theme_color/pyproject.toml | Adds build-system metadata for packaging tooling. |
| web_theme_color/readme/CONTRIBUTORS.md | Contributor fragment for README generation. |
| web_theme_color/readme/DESCRIPTION.md | Description fragment for README generation. |
| web_theme_color/readme/USAGE.md | Usage instructions for setting the parameters. |
| web_theme_color/README.rst | Generated README content for the addon. |
| web_theme_color/static/description/index.html | Generated HTML description for apps/module page. |
| web_theme_color/static/src/scss/primary_variables.scss | Default primary variable overrides for normal mode (prepended). |
| web_theme_color/static/src/scss/primary_variables.dark.scss | Default primary variable overrides for enterprise dark mode (prepended). |
Review details
- Files reviewed: 14/15 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
120c606 to
88fed49
Compare
@Escodoo HT02096
cc: @marcelsavegnago @CristianoMafraJunior @kaynnan