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

Hi, I am creating attachment file(upload documents) in my module. I have created successfully created "upload features" using binary field in following way.

xml:

<field name="file_upload">

Python:

'file_upload':fields.binary('Documents')

Here When I click select button My directory will be opened, then i need choose file. But i want these process is doing automatically. That means When I click save button to save a record, documents should be attached automatically.

I tried many way but still I can not get. pls anyone answer this question,.

アバター
破棄

Anything on this ?

最善の回答

Python:


binary_field = fields.Binary(string = 'File')

file_name = fields.Char(string = 'Filename')

And in the form view in your XML:

filename="file_name"/>


アバター
破棄
関連投稿 返信 ビュー 活動
3
3月 24
17272
2
12月 23
25358
1
3月 15
3412
1
3月 15
4144
0
3月 15
3918