Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3327 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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/

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 24
2418
0
thg 7 24
3579
0
thg 8 22
3058
0
thg 7 22
60
1
thg 7 22
3430