Skip to Content
Menu
This question has been flagged
1 Atsakyti
5624 Rodiniai

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,.

Portretas
Atmesti

Anything on this ?

Best Answer

Python:


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

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

And in the form view in your XML:

filename="file_name"/>


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
3
kov. 24
17273
2
gruod. 23
25359
1
kov. 15
3415
1
kov. 15
4146
0
kov. 15
3922