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

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
2212
0
7月 24
3306
0
8月 22
2946
0
7月 22
60
1
7月 22
3179