Skip to content

[FW][ADD] UI: odoo spreadsheets svg icons #13522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented May 23, 2025

Task: #4792034

This PR proposes introducing the o-spreadsheet icons into the Odoo documentation.


How this works

The Spreadsheet library in Odoo contains two QWeb template files for SVG icons:

These were used to generate an SVG sprite file (extensions/odoo_theme/static/img/odoo-spreadsheet-icons.svg), which can then be utilized by the SVG <use>element to call nodes by ID in the sprite.

This SVG sprite file is then included in the main page layout (extensions/odoo_theme/layout.html)

The RST :icon: role was updated to accomodate an os-* icon specifier.

The SVG sprite file can be generated automatically via a simple script outlined in this gist:
https://gist.github.com/samueljlieber/5ae7648a5ca08e0bfc8455861825e2ff


Why?

This PR attempts to scale an earlier method I used, the RST raw-html(raw) role includes the <svg> markup directly in the Global Filters doc (see this diff).

This was/is not scalable, is not usable throughout multiple docs, and will decay over time as the o-spreadsheet library is updated. This PR attempts to find a solution for using o-spreadsheet icons in documentation.

os-icons-versions

Example

With this implementation, o-spreadsheet icons can be used like so:

This is the :icon:`os-global-filters` :guilabel:`(global filters)` icon!

Forward-Port-Of: #13386

@robodoo
Copy link
Collaborator

robodoo commented May 23, 2025

Pull request status dashboard

@fw-bot
Copy link
Collaborator Author

fw-bot commented May 23, 2025

This PR targets saas-18.2 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

robodoo pushed a commit that referenced this pull request May 23, 2025
closes #13522

X-original-commit: a35a208
Signed-off-by: Samuel Lieber (sali) <sali@odoo.com>
@robodoo robodoo closed this May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants