o-spreadsheet
o-spreadsheet copied to clipboard
[FIX] evaluation: accept 1x1 result array in sub-formula
Description:
Before this commit, when a formula function expected a simple argument, and it received an array, we transformed the array into a simple argument if the array was of size 1x1
However, this process was only done when reading the references to the ranges.
This commit extends the process when the result array comes from a sub-formula and no longer range references.
Task : 3756474
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
Possibility to go further and remove refFn
in compilation parameters.
Since we treat the form of the arguments (matrix or not) before each
sub-formula, --> we can remove the code doing the same thing across
reference reading
POC https://github.com/odoo/o-spreadsheet/pull/3747
@laa-odoo c'est cassé :'(