Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
3591 Представления

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?..

Related Posts Ответы Просмотры Активность
0
апр. 15
3978
2
янв. 16
8986
0
мар. 15
4297
0
сент. 15
5121
3
февр. 24
11524