コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
15516 ビュー

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)
アバター
破棄
最善の回答

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!

アバター
破棄

Hi Sylvain,

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

関連投稿 返信 ビュー 活動
1
7月 20
2712
1
9月 21
2807
2
7月 21
6622
4
10月 20
7132
2
12月 24
2061