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

I have created a custom report which defines:

<!-- CUSTOM HEADER -->
<template id="header_custom">
<t t-name="header_custom">
<div class="header">
<div class="row">
<img class="img img-responsive" src="http://www.foobar.com/logo.png"/>
<hr/>
<p>
<small>
Foo Ltd.<br/>
Bar Street 10<br/>
99.999 Paris<br/>
                                                VAT: FRA0000000
</small>
</p>
</div>
</div>
</t>
</template>

The file structure in the custom module is:

custom_reports
¦
¦___ __init__.py
¦
¦___ __openerp__.py
¦
¦___ xml
¦ ¦
¦ ¦___ custom_reports.xml
¦
¦___ static
¦
¦___ logo.png


So instead of using:

                                <img class="img img-responsive" src="http://www.foobar.com/logo.png"/>


I am wondering if I could do something like:

                                <img class="img img-responsive" src="../static/logo.png"/>


To allow distribution of images embedded inside the module


아바타
취소
베스트 답변

I think that your image path should be something like this:

/module_name/static/logo.png


아바타
취소
베스트 답변

Hi E.M,

The path to your image is invalid. It should be:

<img class="img img-responsive" src="/your_module_name/static/logo.png"/>

Yenthe

아바타
취소

To the person who downvoted me: what is wrong with this answer?..

관련 게시물 답글 화면 활동
0
4월 15
4003
2
1월 16
8998
0
3월 15
4304
0
9월 15
5149
3
2월 24
11550