odoo/o-spreadsheet#3492

Created by fw-bot
label
odoo:saas-15.2-15.0-fix-invalid-range-args-khpa-UVEK-fw
head
2a2c07f962942cd952419108bd569a51564cf277
target
saas-15.2 (inactive)
merged
4 months ago by BI, Pierre Rousseau (pro)
forward-port of
odoo/o-spreadsheet#3361 DETACHED (conflicts: ('1eb59b3bb0b482585ab2b638e6a1c3b931173ee0', 'Auto-merging src/plugins/ui/evaluation.ts\nCONFLICT (content): Merge conflict in src/plugins/ui/evaluation.ts\nAuto-merging tests/formulas/compiler.test.ts\n', '09:49:50.507251 git.c:463 trace: built-in: git cherry-pick 1eb59b3bb0b482585ab2b638e6a1c3b931173ee0\nerror: could not apply 1eb59b3bb... [FIX] evaluation: behavior for invalid range arguments\nhint: After resolving the conflicts, mark them with\nhint: "git add/rm <pathspec>", then run\nhint: "git cherry-pick --continue".\nhint: You can instead skip this commit with "git cherry-pick --skip".\nhint: To abort and get back to the state before "git cherry-pick",\nhint: run "git cherry-pick --abort".\n----------\nstatus:\n', ['1eb59b3bb0b482585ab2b638e6a1c3b931173ee0']) ('1eb59b3bb0b482585ab2b638e6a1c3b931173ee0', 'Auto-merging src/plugins/ui/evaluation.ts\nCONFLICT (content): Merge conflict in src/plugins/ui/evaluation.ts\nAuto-merging tests/formulas/compiler.test.ts\n', '09:49:50.507251 git.c:463 trace: built-in: git cherry-pick 1eb59b3bb0b482585ab2b638e6a1c3b931173ee0\nerror: could not apply 1eb59b3bb... [FIX] evaluation: behavior for invalid range arguments\nhint: After resolving the conflicts, mark them with\nhint: "git add/rm <pathspec>", then run\nhint: "git cherry-pick --continue".\nhint: You can instead skip this commit with "git cherry-pick --skip".\nhint: To abort and get back to the state before "git cherry-pick",\nhint: run "git cherry-pick --abort".\n----------\nstatus:\n', ['1eb59b3bb0b482585ab2b638e6a1c3b931173ee0']))

[FW][FIX] evaluation: behavior for invalid range arguments

## Description:

When user provides an invalid sheet name in range arguments of a function, it performs computations on
data of specified range from active sheet by default and returns misleading results.

This PR changes the behavior to throw an error instead of performing any kind of computations.

Task: : [3619144](https://www.odoo.com/web#id=3619144&cids=2&model=project.task&view_type=form)

## 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: odoo/o-spreadsheet#3361