[ADD] UI: odoo spreadsheets svg icons #13386
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-spreadsheets-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 anos-*
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 is opened as a draft on
master
to discuss this implementation. There are version-specific icons outlined in the graphic below.View the SVG icons directly in the built documentation
Example
With this implementation, o-spreadsheet icons can be used like so: