Skip to Content
Menu
This question has been flagged
2 Replies
3262 Views

I want to show the attachments on the List View, how can we achieve the same?

Avatar
Discard
Best Answer

Hi,

You can also use widget="many2many_binary" for to show multiple attachments.

For eg:

attachment_ids = fields.Many2many('ir.attachment',string='Image/PDF')

In tree view provide the widget

<field name="attachment_ids" widget="many2many_binary"/>


Regards

Avatar
Discard
Best Answer

Hi Strangpoints, 


As you want to preview the attachment file on the List view, then please add the below widget into the filed of the list view. Then you can also preview the view on List View. widget="attachment" example : In this example, attachment_field is the name of the field that you want to add the file upload widget to in the tree view. Note: Please add the attachment=True in python model binary fields and you must need to use the below modules that have function to allow preview the files. https://apps.odoo.com/apps/modules/15.0/ks_binary_file_preview/ ks_binary_file_preview | Odoo Apps Storeapps.odoo.com

If you need any assistance or support, please don't hesitate to reach out. Our team is always here to help!"

Regards,

Ksolves Team!

Avatar
Discard
Related Posts Replies Views Activity
5
May 23
13465
2
Dec 23
3131
1
Nov 22
1571
1
May 22
992
0
Apr 22
696