Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5651 Zobrazení

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
Zrušit

Anything on this ?

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
bře 24
17303
2
pro 23
25385
1
bře 15
3438
1
bře 15
4159
0
bře 15
3940