odoo/o-spreadsheet#5229

Created by BI, Adrien Minne (adrm)

Blocked

label
odoo:master-sort-array-formula-adrm
head
1d34a39a29592144852ae1248a678fa16473b881
odoo/o-spreadsheet
master #5229 missing r+

[IMP] sort: prevent sorting on range with array formula

Description:

[IMP] sort: prevent sorting on range with array formula

Sorting on an array formula does not work since the spreaded values
cannot be reordered. But the "sort" button was still enabled,
leading to cases where the user tried to sort on an array formula,
which would fail without any feedback.

This commits displays a warning message when the user tries to sort
on a range with an array formula.

[FIX] sort: use allowDispatch instead of throwing

The sort plugin would throw an error if the sort anchor wasn't in the
sort zone, instead of using the standard allowDispatch behaviour of
returning a DispatchResult.

Task: 4342539

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