跳至內容
選單
此問題已被標幟
4413 瀏覽次數

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.


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
9月 24
1575
2
7月 25
3643
0
6月 19
5781
0
4月 24
1876
2
8月 19
12965