Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

How to get a file path with a os system popup ? [Closed]

By
Xsias
on 8/1/13, 6:13 AM 2,796 views

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"/>
1
Xsias
On 8/26/13, 12:45 PM

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)

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!

Guenter Selbert
on 9/23/14, 8:47 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 8/1/13, 6:13 AM
Seen: 2796 times
Last updated: 8/21/15, 9:48 AM