odoo/o-spreadsheet#4829

Created by fw-bot
Merged at 2b57deebe50c8d6eedec416c587770d0e0b7cf91

Statuses:

label
odoo:saas-17.1-15.0-parse-empty-string-lul-_gvK-fw
head
9981e6c334697b73943fd201c575e59cd96cba9e
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: #4827
Forward-Port-Of: #4825