o-spreadsheet icon indicating copy to clipboard operation
o-spreadsheet copied to clipboard

[FIX] spreadsheet_edition: fixes image export in .xlsx

Open anhe-odoo opened this issue 1 year ago • 1 comments

Task Description

o-spreadsheet now allows to insert images in a spreadsheet, and we also allow to export them inside .xlsx file. However, while this works as intended in a standalone o-spreadsheet server, it doens't work correctly in Odoo as the data of the image are not found while we try ton convert the spreadsheet to an xlsx file. This PR aims to simplify the request made to get the binary data of the image file.

Moreover, this PR also add the export of Odoo chart as an image. The way these image are exported is slightly different than classical image, as the chart is converted to base64 data_url, and then directly converted from base64 to binary string, while classical image are loaded from a file to a binary string.

Related tas/PR

  • Task: : 3524473
  • https://github.com/odoo/enterprise/pull/47928

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 (_lt("qmsdf %s", abc))
  • [ ] unit tested
  • [ ] clean commented code
  • [ ] track breaking changes
  • [ ] doc is rebuild (npm run doc)
  • [ ] status is correct in Odoo

anhe-odoo avatar Sep 28 '23 12:09 anhe-odoo

addressed in https://github.com/odoo/o-spreadsheet/pull/2968

rrahir avatar Jun 14 '24 09:06 rrahir