Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
5629 Переглядів

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"/>


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
3
бер. 24
17275
2
груд. 23
25361
1
бер. 15
3420
1
бер. 15
4147
0
бер. 15
3923