Skip to Content
Menu
This question has been flagged
1 Reply
7429 Views

in my view.xml

<div class="o_kanban_image">
<t t-if="record.image.value">
<img t-att-src="kanban_image('op.student', 'image', record.id.value)"
alt="Student"/>
</t>
<t t-if="!record.image.value">
<img t-att-src='_s + "/base/static/img/avatar.png"' alt="Student"/>
</t>
</div>

how to convert above code for dislay image in portal website please help me to do this
Avatar
Discard
Best Answer

Hi,

To show an image in the portal website, you can use the following code, adapt it as you need:

<img t-att-src="'/web/image/op.student/%s/image' % partner_id.id" alt="Student"/>

Best regards!

Avatar
Discard

it works fine in localhost but when i try from another browser it give me net::ERR_CONNECTION_REFUSED in console and view nothing on the page.
any idea ?

Is only the image is not visible in the page or all datas linked to the current model (e.g: partner_id.xxxx)?