Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4394 Представления

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.


Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
сент. 24
1558
2
июл. 25
3605
0
июн. 19
5769
0
апр. 24
1860
2
авг. 19
12936