Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
2251 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen

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

Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Mai 24
3539
0
Mai 24
1459
2
Apr. 16
4461
1
Mai 24
1291
1
Mai 24
1282