Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
1929 Переглядів

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

Аватар
Відмінити
Автор Найкраща відповідь

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

Аватар
Відмінити
Найкраща відповідь

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


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
груд. 23
1864
1
лип. 19
8476
3
бер. 17
9036
1
бер. 25
1201
0
лист. 24
1432