Skip to content

[FIX][18.0] web_theme_classic: don't double-tint required monetary fields#3570

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
Rad0van:18.0-fix-web_theme_classic-required-monetary-overlay
Jun 7, 2026
Merged

[FIX][18.0] web_theme_classic: don't double-tint required monetary fields#3570
OCA-git-bot merged 1 commit into
OCA:18.0from
Rad0van:18.0-fix-web_theme_classic-required-monetary-overlay

Conversation

@Rad0van
Copy link
Copy Markdown
Contributor

@Rad0van Rad0van commented Jun 6, 2026

The required-field background sets --o-input-background-color on every .o_input inside an o_required_modifier. A monetary field renders an absolutely-positioned overlay span (which also carries .o_input) on top of the real input, so the semi-transparent tint was applied to both and the overlap rendered as a darker band over the value.

Keep the overlay background transparent so only the real input carries the required tint, in both form and list views.

Before:
image

After:
image

This is from delivery.carrier configuration where something like this is used:

<label for="free_over" invisible="delivery_type == 'base_on_rule'"/>
<div name="free_over_amount" invisible="delivery_type == 'base_on_rule'">
    <field name="free_over"/>
    <field name="amount" widget="monetary" class="oe_inline" invisible="not free_over" required="free_over"/>
</div>

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @legalsylvain,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:18.0 mod:web_theme_classic Module web_theme_classic labels Jun 6, 2026
@legalsylvain
Copy link
Copy Markdown
Contributor

Not sure to understand what you want to fix. could you provide screenshots before / after ?
thanks !

@Rad0van
Copy link
Copy Markdown
Contributor Author

Rad0van commented Jun 6, 2026

@legalsylvain sorry - my bad. Updated the initial cooment with screenshots and code snippet.

Comment thread web_theme_classic/__manifest__.py Outdated
"name": "Web Theme Classic",
"summary": "Contrasted style on fields to improve the UI.",
"version": "18.0.1.2.0",
"version": "18.0.1.2.1",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That is not necessary.

The required-field background sets --o-input-background-color on every
.o_input inside an o_required_modifier. A monetary field renders an
absolutely-positioned overlay span (which also carries .o_input) on top
of the real input, so the semi-transparent tint was applied to both and
the overlap rendered as a darker band over the value.

Keep the overlay background transparent so only the real input carries
the required tint, in both form and list views.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Rad0van Rad0van force-pushed the 18.0-fix-web_theme_classic-required-monetary-overlay branch from 7c867d4 to f99f49b Compare June 7, 2026 09:23
@legalsylvain
Copy link
Copy Markdown
Contributor

thanks.

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-3570-by-legalsylvain-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f54d1c8 into OCA:18.0 Jun 7, 2026
9 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 3daf540. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants