odoo/o-spreadsheet#5583

Created by fw-bot
Merged at 0cb28d1e8b4c8a7bd3df489ac3b9f9c312524418

Statuses:

label
odoo:saas-17.2-17.0-locale-number-parsing-fix-adrm-XDH--fw
head
541e70a8939d43dbaef6fcbf88257214489bb976
merged
6 months ago by BI, Adrien Minne (adrm)
odoo/o-spreadsheet
17.0 #5573
saas-17.4 #5585
18.0 #5586
saas-17.2 #5583
saas-18.1 #5587
saas-18.2
saas-18.3
saas-18.4
master #5588

[FW][FIX] locale: wrong parsing with "." thousand separator

Description

The parsing of strings to number was wrong if the thousand separator was a ".". We would first replace the locale's thousand separator with JS's thousand separator ("."), and then remove all thousand separators in the string. Thus removing the actual decimal separator.

Task: 4525746

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

Forward-Port-Of: #5573