odoo/o-spreadsheet#3874

Created by fw-bot
Merged at e4d2bd803ecf809f7b8657959c5d18b2f3211325

Statuses:

label
odoo:saas-17.1-17.0-export-export-non-Excel-formulas-as-value-jula-2WDK-fw
head
ea4d4abcc53ada9fd1514622b6bc229c8fcac69e
merged
1 year ago by BI, Vincent Schippefilt (vsc)
odoo/o-spreadsheet
17.0 #3856
saas-17.1 #3874
18.0
saas-17.2 #3902
saas-18.1
saas-18.2
saas-18.3
saas-18.4
master #3903

[FW][FIX] export: export non-Excel formulas as value

Current behavior before commit:
Since the commit 201aea7, when formulaCell is a FormulaCellWithDependencies, content might be set to raw formula even if it is not readable by Excel.

Description of the fix:
Prevent content to be set to the raw formula if isFormula === false.

Example of steps to reproduce the issue:
- Write a number in A1
- Write =FORMAT.LARGE.NUMBER(A1) in A2
- Save as XLSX and open in Excel -> A2 is not evaluated by Excel

opw-3782676

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: #3856