Skip to Content
Menu
This question has been flagged
2 Replies
3166 Zobrazenia

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

Avatar
Zrušiť
Best Answer

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.

Avatar
Zrušiť
Best Answer

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/

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
feb 24
2210
0
júl 24
3301
0
aug 22
2944
0
júl 22
60
1
júl 22
3175