odoo/o-spreadsheet#3874

Created by fw-bot
label
odoo:saas-17.1-17.0-export-export-non-Excel-formulas-as-value-jula-2WDK-fw
head
ea4d4abcc53ada9fd1514622b6bc229c8fcac69e
target
saas-17.1
merged
2 months ago by BI, Vincent Schippefilt (vsc)
forward-port of
odoo/o-spreadsheet#3856 DETACHED (conflicts: ('fb0400d9def19564cab55547595497657f6fab5d', 'Auto-merging src/plugins/ui_core_views/cell_evaluation/evaluation_plugin.ts\nCONFLICT (content): Merge conflict in src/plugins/ui_core_views/cell_evaluation/evaluation_plugin.ts\nAuto-merging tests/xlsx/__snapshots__/xlsx_export.test.ts.snap\nCONFLICT (content): Merge conflict in tests/xlsx/__snapshots__/xlsx_export.test.ts.snap\nAuto-merging tests/xlsx/xlsx_export.test.ts\n', '16:16:06.152849 git.c:463 trace: built-in: git cherry-pick fb0400d9def19564cab55547595497657f6fab5d\nerror: could not apply fb0400d9d... [FIX] export: export non-Excel formulas as value\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', ['fb0400d9def19564cab55547595497657f6fab5d']) ('fb0400d9def19564cab55547595497657f6fab5d', 'Auto-merging src/plugins/ui_core_views/cell_evaluation/evaluation_plugin.ts\nCONFLICT (content): Merge conflict in src/plugins/ui_core_views/cell_evaluation/evaluation_plugin.ts\nAuto-merging tests/xlsx/__snapshots__/xlsx_export.test.ts.snap\nCONFLICT (content): Merge conflict in tests/xlsx/__snapshots__/xlsx_export.test.ts.snap\nAuto-merging tests/xlsx/xlsx_export.test.ts\n', '16:16:06.152849 git.c:463 trace: built-in: git cherry-pick fb0400d9def19564cab55547595497657f6fab5d\nerror: could not apply fb0400d9d... [FIX] export: export non-Excel formulas as value\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', ['fb0400d9def19564cab55547595497657f6fab5d']))

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

__Current behavior before commit:__
Since the commit [`201aea7`][1], 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

[1]: https://github.com/odoo/o-spreadsheet/commit/201aea7

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