Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
5648 Представления

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
17298
2
дек. 23
25383
1
мар. 15
3433
1
мар. 15
4157
0
мар. 15
3932