Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
15579 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää

Hi Sylvain,

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

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
heinäk. 20
2783
1
syysk. 21
2841
2
heinäk. 21
6679
4
lokak. 20
7167
2
jouluk. 24
2133