odoo/o-spreadsheet#7152

Created by fw-bot
Merged at a9e5756c6cc9f2088b35df81b024e377f8666750

Statuses:

label
odoo:saas-18.3-17.0-wrong-error-sort-adrm-463996-fw
head
19739b29f23c26974c711fb180537a36f43e5b31
merged
3 days ago by BI, Adrien Minne (adrm)
odoo/o-spreadsheet
17.0 #7135
18.0 #7145
saas-18.1 #7149
saas-18.2 #7150
saas-18.3 #7152
saas-18.4 #7163
19.0 #7164
master #7165

[FIX] functions: wrong error message for `SORT`

Description

There was a bunch of problems in the errors messages of the SORT and SORTN functions:

  • we were using %d, which isn't supported
  • the index displayed is always wrong
  • we display the same index for both SORT and SORTN while they have different number of mandatory arguments
  • the message said we expected a number or a range while is_ascending

Task: 5085267

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: #7145
Forward-Port-Of: #7135