Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
15502 มุมมอง

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)
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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!

อวตาร
ละทิ้ง

Hi Sylvain,

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 20
2705
refers to an uninstalled module แก้ไขแล้ว
1
ก.ย. 21
2800
2
ก.ค. 21
6618
4
ต.ค. 20
7130
2
ธ.ค. 24
2043