Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
15530 Visninger

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
Kassér
Bedste svar

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
Kassér

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 Besvarelser Visninger Aktivitet
1
jul. 20
2739
1
sep. 21
2816
2
jul. 21
6636
4
okt. 20
7141
2
dec. 24
2076