Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
1919 Vistas

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

Avatar
Descartar
Autor Mejor respuesta

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
dic 23
1858
1
jul 19
8471
3
mar 17
9021
1
mar 25
1191
0
nov 24
1431