Я нахожу решение для моей проблемы для загрузки вложения на веб-сайте, который я добавляю в свой контроллер py:
@http.route(['/page/my_page/<model("my.model"):file>'], type='http', auth="public", website=True)
def my_controller(self, about, **kwargs):
file = http.request.env['ir.attachment'].sudo().search([('res_model','=','my.model'),('res_id','=',file.id)])
print('file:--------------------->>>>>>>>>>',file)
values = {
'files': file,
}
return request.render("my_module.id_template", values)
и мой взгляд в xml
<t t-foreach="files" t-as="f">
<div class="col-sm-4">
<a t-att-href="'/web/content/%i?download=true' % f.id">
<img src="/my_module/static/images/icons/backattach.png" style="width:82px; height:86px" />
<span t-esc="f.name" />
</a>
</div>
</t>
я нахожу этот модуль ссылка