From 18cb11891e0aff69eb2d59872caac9ed5d1eadf4 Mon Sep 17 00:00:00 2001 From: Brieuc-brd Date: Tue, 21 Feb 2023 13:17:17 +0000 Subject: [PATCH] [IMP] *: use svg icons instead of png Prior to this commit, some icons used the png version. After this commit, the svg version is used instead. task-2818586 Part-of: odoo/odoo#116641 --- addons/account/views/account_menuitem.xml | 2 +- addons/im_livechat/tests/test_message.py | 2 +- odoo/addons/base/tests/test_module.py | 2 +- odoo/addons/base/views/base_menus.xml | 4 ++-- odoo/addons/test_lint/tests/test_manifests.py | 2 +- odoo/modules/module.py | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/account/views/account_menuitem.xml b/addons/account/views/account_menuitem.xml index 7b275783a4d..8c05bcf55e6 100644 --- a/addons/account/views/account_menuitem.xml +++ b/addons/account/views/account_menuitem.xml @@ -4,7 +4,7 @@ diff --git a/addons/im_livechat/tests/test_message.py b/addons/im_livechat/tests/test_message.py index b50a22d3ae9..6cbe3a4a903 100644 --- a/addons/im_livechat/tests/test_message.py +++ b/addons/im_livechat/tests/test_message.py @@ -65,7 +65,7 @@ class TestImLivechatMessage(TransactionCase): 'message_type': 'notification', 'messageReactionGroups': [], 'model': 'discuss.channel', - 'module_icon': '/mail/static/description/icon.png', + 'module_icon': '/mail/static/description/icon.svg', 'needaction_partner_ids': [], 'notifications': [], 'pinned_at': False, diff --git a/odoo/addons/base/tests/test_module.py b/odoo/addons/base/tests/test_module.py index 512d9888ffd..ed14e648655 100644 --- a/odoo/addons/base/tests/test_module.py +++ b/odoo/addons/base/tests/test_module.py @@ -48,7 +48,7 @@ class TestModuleManifest(BaseCase): 'depends': [], 'description': '', 'external_dependencies': {}, - 'icon': '/base/static/description/icon.png', + 'icon': '/base/static/description/icon.svg', 'init_xml': [], 'installable': True, 'images': [], diff --git a/odoo/addons/base/views/base_menus.xml b/odoo/addons/base/views/base_menus.xml index 178a975cc85..37ffc32cc7c 100644 --- a/odoo/addons/base/views/base_menus.xml +++ b/odoo/addons/base/views/base_menus.xml @@ -4,10 +4,10 @@ - + diff --git a/odoo/addons/test_lint/tests/test_manifests.py b/odoo/addons/test_lint/tests/test_manifests.py index d5fd176e518..0e8db5c0d37 100644 --- a/odoo/addons/test_lint/tests/test_manifests.py +++ b/odoo/addons/test_lint/tests/test_manifests.py @@ -93,7 +93,7 @@ class ManifestLinter(BaseCase): ) self.assertNotEqual( value, - f"/{module}/static/description/icon.png", + f"/{module}/static/description/icon.svg", f"Setting manifest key icon to the default manifest value for module {module!r}. " "You can remove this key from the dict to reduce noise/inconsistencies between manifests specifications" " and ease understanding of manifest content." diff --git a/odoo/modules/module.py b/odoo/modules/module.py index 48ba5d0f752..439c945524b 100644 --- a/odoo/modules/module.py +++ b/odoo/modules/module.py @@ -37,7 +37,7 @@ _DEFAULT_MANIFEST = { 'depends': [], 'description': '', 'external_dependencies': {}, - #icon: f'/{module}/static/description/icon.png', # automatic + #icon: f'/{module}/static/description/icon.svg', # automatic 'init_xml': [], 'installable': True, 'images': [], # website @@ -240,7 +240,7 @@ def get_resource_from_path(path): return None def get_module_icon(module): - iconpath = ['static', 'description', 'icon.png'] + iconpath = ['static', 'description', 'icon.svg'] if get_module_resource(module, *iconpath): return ('/' + module + '/') + '/'.join(iconpath) return '/base/' + '/'.join(iconpath)