Help

How to get a file path with a os system popup ?

Closed
Avatar
Xsias

The question has been closed

by
Xsias
on 08/26/2013 12:45:39

In my custom module, i want to create a button which open a system window to select a file. Once the file selected, i need to get his path on the OS system.

I don't need/want to upload the file temporaly or wathever, i just need the path.

In python, i have "path": fields.char() wich will be filled up with the path. I don't want a binary field.

Is it possible ? If yes, how ?

Cordially,

I've tried :

<input class="oe_form_binary_file" type="file" name="test"></input>

OR

<button name="path_in" string="Select your file" type="char" class="oe_highlight"/>

OR

<field name="path_in" colspan="4" widget="url"/>

OR

<field name="path_in" colspan="4" widget="file"/>
Avatar
Discard
1 Answer
1
Avatar
Xsias
Best Answer

I've found an other way.

I've made a new menu. Behind this menu, i've created a wizard with a binary field. This wizard can do a pop up windows cause he has a binary field and i don't need to add a binary field in my first class which has only a char field.

I've not found the answer, but this is an alternative.

(If somebody find the good answer, post a comment, i will reopen the question)

1 Comment
Avatar
Discard
Avatar
Guenter Selbert
-

Hi, im looking for a widget which allows the user to select a local/samba directory to save the path in a model. I would be glad if you share your code!