diff --git a/content/contributing/documentation/rst_cheat_sheet.rst b/content/contributing/documentation/rst_cheat_sheet.rst index 5a6265638..779f140a4 100644 --- a/content/contributing/documentation/rst_cheat_sheet.rst +++ b/content/contributing/documentation/rst_cheat_sheet.rst @@ -216,18 +216,21 @@ Use the `command` markup to highlight a command. Icons ----- -Use the `icon` markup to add a class name of an icon. The icon set used is *Font Awesome*. It is -recommended to accompany an icon with a :ref:`contributing/markups/guilabel` as a descriptor, -however, it is not mandatory. +Use the `icon` markup to add a class name of an icon. There are two icon sets used in Odoo: +`FontAwesome4 `_ and :doc:`Odoo UI +`. It is recommended to accompany an icon with a +:ref:`contributing/markups/guilabel` as a descriptor, however, it is not mandatory. .. list-table:: :class: o-showcase-table - * - The graph view is represented by the :icon:`fa-bar-chart` :guilabel:`(bar chart)` icon. + * - The graph view is represented by the :icon:`fa-area-chart` :guilabel:`(area chart)` icon. The + pivot view is represented by the :icon:`oi-view-pivot` icon. * - .. code-block:: text - The graph view is represented by the :icon:`fa-bar-chart` :guilabel:`(bar chart)` icon. + The graph view is represented by the :icon:`fa-area-chart` :guilabel:`(area chart)` icon. + The pivot view is represented by the :icon:`oi-view-pivot` icon. .. _contributing/lists: diff --git a/extensions/odoo_theme/__init__.py b/extensions/odoo_theme/__init__.py index ab9ff8a67..49d40a001 100644 --- a/extensions/odoo_theme/__init__.py +++ b/extensions/odoo_theme/__init__.py @@ -115,12 +115,12 @@ def resolve(old_resolve, tree, docname, *args, **kwargs): def icon_role(name, rawtext, text, lineno, inliner, options=None, content=None): """ Implement an `icon` role for Odoo and Font Awesome icons. """ for icon_class in text.split(): - if not icon_class.startswith('fa-'): + if not (icon_class.startswith('fa-') or icon_class.startswith('oi-')): report_error = inliner.reporter.error( f"'{icon_class}' is not a valid icon formatting class.", lineno=lineno ) error_node = inliner.problematic(rawtext, rawtext, report_error) return [error_node], [report_error] - icon_html = f'' + icon_html = f'' if text.startswith('oi-') else f'' node = nodes.raw('', icon_html, format='html') return [node], []