odoo/o-spreadsheet#4598
Created by BI, Rémi Rahir (rar)
Statuses:
- label
- odoo:master-cf-eval-imp-rar
- head
- 11ef323be95cdc37b6ddcadf1dcf56a257b4d4e6
- merged
- 2 months ago by BI, Lucas Lefèvre (lul)
odoo/o-spreadsheet | |
---|---|
master | #4598 |
[IMP] CF: Capture invalid formula for cellIsRule
A user could input an invalid formula in for "cellIsRule" type of conditional formats. Up until recently, this did not pause any problem because the evaluation of cf was wrapped in a try catch and we would simply ignore the faulty formulas.
Unfortunately, following
#3380, the try/catch was removed and the faulty CF would throw an error during its evaluation.
This commit reinstates the try-catch in case another part of the evaluation could throw in the future so that the end user would not see their spreadsheet chrash entirely and become unable to use it themselves.
It also adds a new condition to the CF allow dispatch to capture invalid formula in order to warn the user during the CF edition in the same way we already handle invalid formulas for colorScale and Iconset rules.
Description:
description of this task, what is implemented and why it is implemented that way.
Task: : TASK_ID
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