odoo/o-spreadsheet#5215

Created by fw-bot
Merged at 1261fa1e60e8cf3b9cf3c5b8cfa5dab078fbd0ee

Statuses:

label
odoo:master-17.0-fix-array-recompute-deps-rar-YG3N-fw
head
9d76f8d3f223a7fff19bcc551f7d81695df87e3c
merged
1 week ago by BI, RĂ©mi Rahir (rar)
odoo/o-spreadsheet
17.0 #5209
saas-17.2 #5211
saas-17.4 #5212
18.0 #5214
master #5215

[FW][FIX] evaluation: Ensure dependency invalidation for array formulas

How to reproduce:
-> see the attached test

What is happening?
During the evaluation of SUMIFS, it will fetch its ranges. First it will first fetch an empty range (E4:E7) since MUNIT hasn't been evaluated yet.
Afterwards, it will fetch H4, which in turn will request C4 and therefore force the evaluation of the spreaded function MUNIT.

AT this point, there is a disparity of values because the values of the range (E4:E7) have changed.
To address those situations, the evaluator invalidates the dependencies of all the spreaded zone. Which means marking A1 to be recomputed.

Unfortunately, A1 is still being evaluated and since #4589 (specifically commit 8d22e86) we remove the cell from the queue after we evaluted it.

This revision changes the approach taken in 8d22e86 to allow legitimate invalidations take place while avoiding useless reevaluations.

task-4252800

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

Forward-Port-Of: #5214
Forward-Port-Of: #5209