odoo/o-spreadsheet#7634
Created by BI, Rémi Rahir (rar)
- label
- odoo:master-force-link-color-as-a-true-style-rar
- head
- 36f5691dc7b579af03fc70f5ec221423f8e816cd
| odoo/o-spreadsheet | |
|---|---|
| master | #7634 missing r+ |
[IMP] Cells: set explicit style on hyperlink-like content
Currently, we apply a custom style to the cells that contain a content similar to a hyper/markdown link during the rendering process. This means that this style disappears once we export the spreadsheet to other formats (.xlsx for instance ). Furthermore, the detection depends on the elements added to urlRegistry.
In some cases (specifically when loading a spreadsheet in a public page in Odoo) we might populate this registry differently, which leads to a difference of behaviour between renderers of the same raw content.
Since the style was computed during the rendering process, it means that you could not just "get rid" of that style, you had to define a dedicated style to override it, so 'clear format' would never work.
This revision changes our strategy and tries to explicitely apply a specific style when adding a content detected as a hyperlink/markdownling. This way, we ensure that the style is hardcoded in the data and will be consistent when we export it in .xslx files or if we show it on a public page in Odoo.
Description:
description of this task, what is implemented and why it is implemented that way.
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