Skip to content

[IMP] web_timeline: export timeline as SVG#3446

Open
cyrilfassiau wants to merge 2 commits intoOCA:18.0from
cyrilfassiau:imp-web_timeline-export-svg
Open

[IMP] web_timeline: export timeline as SVG#3446
cyrilfassiau wants to merge 2 commits intoOCA:18.0from
cyrilfassiau:imp-web_timeline-export-svg

Conversation

@cyrilfassiau
Copy link

[IMP] web_timeline: export timeline as SVG

This PR adds an Export SVG feature to web_timeline, so users can save the currently displayed timeline as an SVG for documentation/reporting purposes (as requested in the related issue discussion).

What’s inside

  • Add an Export SVG button in the timeline renderer toolbar.
  • Small toolbar layout tweak: wrap the existing buttons in an extra <div> and use flex layout so the new export button is visually separated and easier to find.
  • Export implementation:
    • Capture the rendered timeline DOM (vis-timeline)
    • Embed it into an SVG using a foreignObject
    • Inline computed styles to keep the exported SVG visually consistent outside Odoo

Notes / limitations

  • The exported SVG relies on foreignObject (compatibility may vary depending on the SVG viewer/editor).
  • Tested on a local Odoo instance in modern browsers.

Feedback request

Does this approach match the expected feature described in the issue?
I’m happy to adjust the implementation if another export strategy is preferred.

@OCA-git-bot
Copy link
Contributor

Hi @tarteo,
some modules you are maintaining are being modified, check this out!

@cyrilfassiau cyrilfassiau force-pushed the imp-web_timeline-export-svg branch from 4f6d9ff to 9019d1b Compare February 21, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants