Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
1117 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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.

Autor

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

Najlepsza odpowiedź


\`\`\`

<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.               



Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
lut 24
3767
3
lut 18
7317
4
mar 15
5369
4
kwi 24
2622