o-spreadsheet icon indicating copy to clipboard operation
o-spreadsheet copied to clipboard

[FIX] evaluation: accept 1x1 result array in sub-formula

Open laa-odoo opened this issue 1 year ago • 3 comments

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

laa-odoo avatar Feb 26 '24 07:02 laa-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 avatar Feb 26 '24 15:02 laa-odoo

@laa-odoo c'est cassé :'(

rrahir avatar Mar 18 '24 13:03 rrahir