İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
1123 Görünümler

Dear Community,


I have a problem with the logo on the settings form.


I have add the icon in the static/icon.png and the icon is showing in the apps form but it's not showing in the settings form.





Is It necesary any configuration?


Kind regards

Avatar
Vazgeç
En İyi Yanıt

Hi,To add an icon in general settings, include the following code in the res.config.settings view file:

<div class="app_settings_block" data-string="Materials Construction"
                     string="Materials Construction"
                     data-key="your_module_name">

In data-key add your module name


Hope it helps

Avatar
Vazgeç
Üretici

Dear Cybrosys,

I'm trying the option but it's not working.
The code is :

<xpath expr="//form" position="inside">
<app data-string="construction_material"
id="cm" string="Materiales Construcción" name="cm"
>
<div
class="app_settings_block" data-string="Materials Construction"
string="Materials Construction"
data-key="construction_material"
>
<block title="Calculos inventario"
id="end_inventory_settings"
>
<setting string="Inventario Uom Ampliada">
<div class="text-muted content-group mt16">
<field name="inventory_uom_expanded" />
</div>
</setting>
</block>
<block title="Facturación" id="end_invoicing_settings">
<setting string="Diario contable por almacén">
<div class="text-muted content-group mt16">
<field name="journal_for_location" />
</div>
</setting>
</block>
</div>
</app>
</xpath>

Kind regards.

Üretici

Dear Cybrosys

I have do a lot of test, I changed the res.config.settings and I have find the solution, it's similar that your solutions but the name of the data-key should the same name of the name folder of your module.

Example :
<app data-string="name_folder"
id="name_folder" string="Module Name" name="name_folder"
>

Kind regards

En İyi Yanıt


\`\`\`

<record id="res_config_settings_view_form" model="ir.ui.view">

    <field name="name">res.config.settings.view.form.inheritz</field>

    <field name="model">res.config.settings</field>          

    <field name="inherit_id" ref="base.res_config_settings_view_form" />

    <field name="arch" type="xml">

        <xpath expr="//form" position="inside">

            <app data-string="Module Name" string="Module Name" name="module_name" groups="base.group_user">

                -- add your configuration here --

            </app>

        </xpath>

    </field>

</record>

\`\`\`


   


It is for odoo v17.               



Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Şub 24
3772
3
Şub 18
7320
4
Mar 15
5370
4
Nis 24
2632