콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
1988 화면

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


아바타
취소
관련 게시물 답글 화면 활동
0
12월 23
1910
1
7월 19
8595
3
3월 17
9127
1
3월 25
1342
0
11월 24
1526