Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
16290 Vues

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
Ignorer
Meilleure réponse

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
Ignorer

Hi Sylvain,

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

Publications associées Réponses Vues Activité
1
juil. 20
3154
1
sept. 21
3221
2
juil. 21
7129
4
oct. 20
7635
2
déc. 24
2722