This question has been flagged
2907 Views

Hi, guys

I am now trying to inherit ir.attachment in odoo, and I have some problems when downloading files that just uploaded by users.

Below is the original source code of attachment kanban view under addons/mail/static/src/xml/thread.xml line:274

<div class="o_image_box">
<img t-attf-src="/web/image/#{attachment.id}/200x200/?crop=True"/>
<div t-attf-class="o_image_overlay o_attachment_view" t-att-data-id="attachment.id">
<a class="o_attachment_download" t-att-href='attachment.url' target="_blank">
<i t-attf-class="fa fa-2x fa-arrow-circle-o-down" title="Download this attachment" aria-hidden="true"></i>
</a>
</div>
</div>

as shown in the code, t-attf-src shows the location where odoo cache the picture uploaded by user.


However, now I am writing this in a new model, so the link '/web/image/...' does not work anymore, anyone knows where does odoo cache the uploaded file? 

Thanks a lot.


Avatar
Discard