Skip to Content
Menu
This question has been flagged
2 Replies
2262 Zobrazenia

i want to disable the feature where when attachment is clicked it downloads the attachment instead i want it to open the pdf attachement in a new window
working with odoo 16

Avatar
Zrušiť
Best Answer

Hi Hassan:

You need to overwrite the many2many_binary template,  coz the default behavior of such field when click on is 'download' . Just look at line 33~ 35 of the template named "Many2ManyBinaryField.attachment_preview" (file path: addons/web/static/src/views/fields/many2many_binary/many2many_binary_field.xml) :

Avatar
Zrušiť

It's actually an href tag , you can try replacing the attr "download=" with "target=_blank".

Best Answer

https://apps.odoo.com/apps/modules/16.0/odx_m2m_attachment_preview
By using this module, you can have the preview of the attachments 

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
máj 24
3550
0
máj 24
1461
2
apr 16
4474
1
máj 24
1292
1
máj 24
1290