跳至內容
選單
此問題已被標幟
2 回覆
2233 瀏覽次數

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

頭像
捨棄
最佳答案

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) :

頭像
捨棄

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

最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
5月 24
3524
0
5月 24
1458
2
4月 16
4449
1
5月 24
1288
1
5月 24
1269