odoo/o-spreadsheet#5164

Created by BI, Mehdi Rachico (mera)
Merged at 64c919e9d955f4129a0f1780c153082c5cb696d3

Statuses:

label
odoo:master-improve-cf-bar-rule-mera
head
38fa4db7269948dce4e1732b561a1654a9e9c4e5
merged
2 days ago by BI, Lucas Lefèvre (lul)
odoo/o-spreadsheet
18.0 #5164
master #5266 missing statuses missing r+

[IMP] conditional_format: improve CF data bar behavior for non-matching range sizes

Before this commit, defining a CF data bar rule based on the value of another range requires both ranges to have matching sizes, preventing the CF from being created otherwise. This restriction leads to a poor user experience when copying and pasting CFs, as the CF does not get pasted.

This commit removes the restriction, allowing CF creation in a "best effort" manner when the range sizes do not match. The CF style is therefore applied by comparing the matching cells.

Task: 4280720

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