1

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!

Jesse
  • 727
  • 13
  • 44

2 Answers2

1

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.

CZoellner
  • 13,553
  • 3
  • 25
  • 38
0

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.

user 12321
  • 2,846
  • 1
  • 24
  • 34