Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
15539 Tampilan

I want to upload multiple file how i can achieve it please let me know.


Here is the my xml field (

<field name="attachment_ids"/>)
Here is the .py
attachment_ids = fields.Binary("Attachment", required=True)
Avatar
Buang
Jawaban Terbai

Hi,

You can add the attribute many2many_binary widget to upload one or more file in same time and display in list. The user can delete his files.

e.g: 

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

Best regards!

Avatar
Buang

Hi Sylvain,

'many2many_binary' widget can only be used with many2many fields. Also note that this widget is specific to the model 'ir.attachment'.

Post Terkait Replies Tampilan Aktivitas
1
Jul 20
2746
1
Sep 21
2822
2
Jul 21
6644
4
Okt 20
7145
2
Des 24
2088