콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
10702 화면

Hello everyone,

I have created a new area under "General Settings" (res_config_settings) for Odoo 12.

If I set my module as "application = True", I can see the icon defined for the module shown on the new General Settings Area

My problem is that my module is not an application. It is an addon and in this case, I cannot see the icon shown on this new settings area.

How can I force an icon to be shown on General Settings area?

Thank you all in advance

Best regards

PM

아바타
취소
베스트 답변

You have to define some settings in res.config.settings model and in view, for example


<odoo>
    <record id="res_config_settings_view_form" model="ir.ui.view">
        <field name="name">Debranding Configuration</field>
        <field name="model">res.config.settings</field>
        <field name="inherit_id" ref="website.res_config_settings_view_form"/>
        <field name="arch" type="xml">
            <xpath expr="//div[hasclass('app_settings_block')]" position="after">
                <div class="app_settings_block"
                     data-string="Debrand"
                     string="Debrand"
                     data-key="odoo-debrand-11"
                >
                                ...

.....

Here is an example form my debranding module. You can refer to this module and can find how I did for the debranding settings.

links:   https://github.com/hilarak/odoo_community_addons/blob/12.0/odoo-debrand-11/views/views.xml

Appstore: https://www.odoo.com/apps/modules/12.0/odoo-debrand-11/


아바타
취소
작성자

Thank you @Hilar,

Your links are very useful. I do use your debranding module also.

I have looked on the code and I did not find any part of it where you refer the "icon" to be shown under new area for general Settings. Unfortunately I am unable to post images here since several weeks.

I will try to explain myself:

- When we access General Settings, we can see on the left side, settings for the several applications installed.

Here we have: General Settings, Invoicing, Sales, Inventory... and so on, depending on the applications installed.

Every specific "settings area" has an icon which is the exact same icon as the application icon (ie. for the invoicing settings area, we can see the icon defined for the invoicing application).

I have created a "new settings area" for my addon, but the icon defined for my addon does not show on this new "settings area" I have created.

For testing purposes, I changed my addon to became an application instead of an addon and the icon shows fine for this new "settings area" I have created. So, if I define my addon as an application, icon shows fine, if I make it an addon, the icon does not show.

How can I make the icon show on this area for an addon (not an application)?

Thank you once again

best regards

PM

베스트 답변

Hello Paulo 

For adding icon in general settings you just follow one thing.

<div class="app_settings_block" data-string="Website Addon" string="

Website Addon" data-key="module_name">

In data key add your module name that's it then you able to see icon without setting application= True

아바타
취소
관련 게시물 답글 화면 활동
2
7월 20
13543
1
10월 25
1383
3
10월 23
9638
1
9월 23
3681
1
5월 23
2598