Skip to Content
Menú
This question has been flagged
1 Respondre
5618 Vistes

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

Avatar
Descartar

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


Avatar
Descartar
Related Posts Respostes Vistes Activitat
3
de març 24
17270
2
de des. 23
25357
1
de març 15
3412
1
de març 15
4144
0
de març 15
3916