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

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)
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ

Hi Sylvain,

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 20
2710
1
thg 9 21
2804
2
thg 7 21
6620
4
thg 10 20
7132
2
thg 12 24
2056