I've installed Odoo 13.0 Community Edition and I already changed the module icons from Settings -> Technical -> Menu Items but that did not change how the icons look in general settings menu. How can i change those icons? I have not changed any XML codes for the settings because I actually do not know how to or where to find the files...
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
The menu does not have to do with the icon inside the general settings menus.
These setting menus are created from JS and is looking at the icon.png file inside "module_name/static/description/icon.png" inside the module.
_getAppIconUrl is the method of JS to create the icon URL. You will have to override this method and add the path of your icon. You can add the condition to change the icon of a specific module(s).
Try the following code in your custom module:
Ex:
odoo.define('custom_base.settings', function (require) {
"use strict";
var BaseSettingRenderer = require('base.settings').Renderer;
BaseSettingRenderer.include({
_getAppIconUrl: function (module) {
if (module == 'website') {
return "/my_website_module/static/description/icon.png";
}
else {
return this._super.apply(this, arguments);
}
}
});
});
I hope this will solve your problem.
Keep an icon.png image under the description folder and make sure to use the data-key attribute.
for example:
<div class="app_settings_block"
data-string="Debrand"
string="Debrand"
data-key="odoo-debrand-11"
>
Since I still cannot comment as I do not have enough Karma, I'm writing this as an answer but I'm asking where do I insert this piece of code Hilar AK added.
please update your question with the XML code that you added for general settings.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký