Skip to content

[18.0][ADD] web_theme_color: add new module - #7

Merged
marcelsavegnago merged 1 commit into
18.0from
18.0-add-web_theme_color
Oct 6, 2026
Merged

marcelsavegnago merged 1 commit into
18.0from
18.0-add-web_theme_color

Conversation

@WesleyOliveira98

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.18%. Comparing base (77dbd56) to head (88fed49).

Files with missing lines Patch % Lines
web_theme_color/tests/test_web_theme_color.py 96.82% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 hooks ir.config_parameter to 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.

Comment thread web_theme_color/readme/USAGE.md Resolved
Comment thread web_theme_color/readme/USAGE.md Resolved

@DenerWilliam DenerWilliam left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@marcelsavegnago
marcelsavegnago merged commit 471f24b into 18.0 Oct 6, 2026
6 checks passed
@marcelsavegnago
marcelsavegnago deleted the 18.0-add-web_theme_color branch October 6, 2026 14:36
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.

4 participants