odoo/o-spreadsheet#4826

Created by fw-bot
Merged at 6316fb50aba1472ce256e5ec416be5fa51946eac

Statuses:

label
odoo:16.0-15.0-parse-empty-string-lul-blCI-fw
head
03793a827800d2fa5e0b6c2f1b5d9ca60ecd872c
merged
9 months ago by BI, Lucas Lefèvre (lul)
odoo/o-spreadsheet
15.0 #4825
16.0 #4826
17.0 #4827
saas-17.4 #4832
saas-17.1 #4829
saas-17.2 #4830
18.0
saas-18.1
saas-18.2
saas-18.3
master #4833

[FW][FIX] parser: parsing empty string throws meaningful error

Description:

parse("") throws an error like cannot ready property of undefined.

Note that it doesn't cause any (known) real bug, but let's make it more robust nonetheless.

With this commit, it throws a user friendly message.

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