odoo/o-spreadsheet#7287

Created by BI, Adrien Minne (adrm)

Blocked

label
odoo:19.0-fix-humanize-decimal-numbers-adrm
head
cc602b827a022aba02a9dc3b27806c480907614c
odoo/o-spreadsheet
19.0 #7287 missing r+
master

[FIX] charts: correctly humanize decimal numbers

Description

We have an humanizeNumbers option for the chart to make large numbers more readable. The option is enabled by default on every chart, but it was not correctly handling decimal numbers. The function was always rounding them to the nearest integer, which does not make sense for small numbers (eg. 0.15 should not be displayed as 0).

Task: 5155591

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