Getting not found error for downloading document while logged in "PUBLIC user" in website sale.
in my controller:
attachments = request.env['ir.attachment'].sudo().search( [('res_id', '=', order.id)])
in my xml
<t t-foreach="attachments" t-as="attachment">
<a target="_blank" t-attf-href="/web/content/#{attachment.id}?download=1" t-esc="attachment.datas_fname" class="fa fa-download"/>
I can able to download in users, but i'm getting not found err in public user