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

can't able to preview img,pdf,and other frmt without download  from many2many ir.attachment in custom model in odoo14 

アバター
破棄
最善の回答

If you are unable to preview images, PDFs, and other formats from a many2many field of ir.attachment in a custom model in Odoo 14, there could be a few reasons for this issue.

Here are a few things you can try:

  • Make sure the appropriate dependencies are installed, such as the Python Imaging Library (PIL) or the Python PDF library (PyPDF2) for image and PDF previews respectively.
  • Check the access rights on the ir.attachment model, and ensure that the user has the necessary permissions to view the attachments.
  • Verify that the file storage path is correctly configured and that the files are stored in the correct location.
  • Make sure that the correct widget is being used to display the attachments in the form view.
  • Verify the return of the read method of the attachment model if you are using a custom one.
  • Inspect the code of the many2many field and make sure it is correctly configured and that the widget is set to 'binary'
  • Make sure the attachments are being properly stored in the database and that the filepaths are correct.

If you continue to experience issues, it may be helpful to check the Odoo 14 documentation or the Odoo community website for more information, or consider consulting a professional for assistance.

アバター
破棄
最善の回答

Using this module you can preview attachments from many2many with the help of widget.

https://apps.odoo.com/apps/modules/14.0/odx_m2m_attachment_preview/

アバター
破棄
関連投稿 返信 ビュー 活動
1
2月 24
2422
0
7月 24
3592
0
8月 22
3064
0
7月 22
60
1
7月 22
3438