Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
26211 Widoki

Hi All,

I have a binary field in a wizard, and I am trying to get the name of file attached in button action of that wizard.

I know it is possible in website.

Any Hints.?

Awatar
Odrzuć
Najlepsza odpowiedź

Try this,

In Model,

file = fields.Binary("Attachment")

file_name = fields.Char("File Name")

In View,

<field name="file" filename="file_name"/>

<field name="file_name" invisible="1"/>

If you try this, binary field will show the file name.

Awatar
Odrzuć
Autor

Perfect, Accepting as answer.

Could you please tell me any way to get the path of the attached file.?

Autor

Yes, Got it

Powiązane posty Odpowiedzi Widoki Czynność
0
paź 23
1603
4
paź 18
8367
3
cze 18
6927
1
gru 19
3511
0
paź 19
2838