does anybody knows how to open a filedialog on Odoo? I've add a button on a custom view, now I would like to browse for a file on THE CLIENT when this button is clicked.
Any ideas?
Thanks!
does anybody knows how to open a filedialog on Odoo? I've add a button on a custom view, now I would like to browse for a file on THE CLIENT when this button is clicked.
Any ideas?
Thanks!
You can define binary fields in Odoo, like other fields. Look into ir.attachment model definition and its view definitions to get a good hint, how do it for such fields.
you need to implement a custom widget for this. object buttons trigger actions in server side not client side
You can find more about widgets in the ofoocial documentation odoo.com/documentation/8.0/howtos/web.html also you may find some examples of odoo widgets in addons/web/static/src/js/view_form.js If you want just to upload a file you don't have to go through all of this you may use the binary field of odoo and the task is handled by odoo.