Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
1924 Zobrazení

src="/module_name/static/description/image.png" does not seem to work on image tags in my xml template. I'm on odoo16.

Avatar
Zrušit
Autor Nejlepší odpověď

I added class="article" to the top div element and suddenly the report came to life. My images displayed, the font was set etc I don't know what it does but it worked for me. Thanks for the help anyways

Avatar
Zrušit
Nejlepší odpověď

Hi,
Refer to the below code

<template id="your_template_id" inherit_id="your_inherited_template_id" name="Your Template Name">
    <!-- Add the web directive to reference static assets -->
    <xpath expr="//img/@src" position="replace">
<attribute name="t-att-src">web/image/module_name/static/description/image.png</attribute>
    </xpath>

    <!-- Your other template content goes here -->
</template>

Hope it helps


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
pro 23
1860
1
čvc 19
8473
3
bře 17
9024
1
bře 25
1197
0
lis 24
1431