Odoo Help


Create buttons in wizard + Force download file generated

on 1/13/15, 7:15 AM 2,012 views


In Odoo (Openerp 7,8), In need to create an action from wizard that if I click in the action, there is a wizard with a button to generate file.csv. The file is created and attached in the object but I like to force download this file.



Dorin Hongu
On 4/3/16, 2:05 AM
         wizard = self.env['wizard.name'].with_context({'active_id':self.id}).create({})
return {
'type' : 'ir.actions.act_url',
'url': '/web/binary/saveas?model=wizard.name&field=data_file&id=%s&filename_field=name' % (wizard.id),
'target': 'self',

Refer below link http://www.emiprotechnologies.com/technical_notes/odoo-technical-notes-59/post/how-to-download-any-file-on-button-click-244

Ankit H Gandhi(AHG)
on 4/3/16, 6:11 AM
Dev Loper
On 2/7/17, 12:07 PM

 Hi, i have the same problem (i want to download a binary field content). I used the solution of empiro technologies but i end up with 404 error. (I'd like to post a comment but i've not the required karma)

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 1/13/15, 7:15 AM
Seen: 2012 times
Last updated: 2/7/17, 12:07 PM