Skip to content

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

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

@samueljlieber samueljlieber force-pushed the master-master-ui-icons-spreadsheet-sali-438549-fw branch from 5323eb9 to 51c9458 Compare May 23, 2025 15:32
@fw-bot
Copy link
Collaborator Author

fw-bot commented May 23, 2025

@samueljlieber this PR was modified / updated and has become a normal PR. It must be merged directly.

@C3POdoo C3POdoo requested review from a team May 23, 2025 15:33
@samueljlieber
Copy link
Contributor

5323eb9

  • Updated master Odoo Spreadsheet icons

@samueljlieber samueljlieber removed request for a team May 23, 2025 15:34
@samueljlieber
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request May 24, 2025
closes #13524

X-original-commit: a35a208
Signed-off-by: Samuel Lieber (sali) <sali@odoo.com>
@robodoo robodoo closed this May 24, 2025
@robodoo robodoo added the 18.4 label May 24, 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