Skip to content

[FIX] conditional_formatting: handle zero color scale midpoint#9026

Open
dhrp-odoo wants to merge 1 commit into
17.0from
17.0-fix-cf-color-scale-dhrp
Open

[FIX] conditional_formatting: handle zero color scale midpoint#9026
dhrp-odoo wants to merge 1 commit into
17.0from
17.0-fix-cf-color-scale-dhrp

Conversation

@dhrp-odoo

Copy link
Copy Markdown
Contributor

Description:

A color scale midpoint value of 0 was treated as absent because the evaluation logic checked the parsed midpoint with truthiness.

As a result, three-point color scales with a midpoint at 0 were evaluated as two-point scales, interpolating directly from minimum to maximum color. This made the midpoint cell use a mixed color instead of the configured midpoint color.

Task: 6312961

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

A color scale midpoint value of 0 was treated as absent because the
evaluation logic checked the parsed midpoint with truthiness.

As a result, three-point color scales with a midpoint at 0 were evaluated
as two-point scales, interpolating directly from minimum to maximum color.
This made the midpoint cell use a mixed color instead of the configured
midpoint color.

Task: 6312961
@robodoo

robodoo commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Pull request status dashboard

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.

2 participants