Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
15504 Vizualizări

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)
Imagine profil
Abandonează
Cel mai bun răspuns

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!

Imagine profil
Abandonează

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 Răspunsuri Vizualizări Activitate
1
iul. 20
2706
1
sept. 21
2800
2
iul. 21
6618
4
oct. 20
7130
2
dec. 24
2044