コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
2288 ビュー

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
3576
0
5月 24
1484
2
4月 16
4488
1
5月 24
1299
1
5月 24
1300