Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
1153 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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.

Autore

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

Risposta migliore


\`\`\`

<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
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
feb 24
3804
3
feb 18
7344
4
mar 15
5383
4
apr 24
2672