Odoo Help


button download ?

on 9/19/14, 6:56 AM 748 views


someone can tell me how to make a button to download the current document ? the current document is a document which is saved in the datatbase

hajar el hamdani
On 9/19/14, 7:45 AM

you have to add this code to your XML code 

<button name="summary_print" type="object" string="Print" class="oe_highlight"/> ou <button name="cancel" string="Annuler" special="cancel" class="oe_link"/>

ans this to code python

def summary_print( self, cr, uid, ids, context = None ):
        stats_obj = self.pool.get( 'class.name' )
        datas = {
            'ids': ids,
            'model': 'class.name',
            'context': context,

        return {
            'type': 'ir.actions.report.xml',
            'report_name': 'report.name',
            'context': context,
            'datas': datas,
            'nodestroy' : True

Thanx Hajar for ur answer but i want to download a document which is saves in the database, not a report ??

on 9/19/14, 12:24 PM

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

1 follower(s)


Asked: 9/19/14, 6:56 AM
Seen: 748 times
Last updated: 3/16/15, 8:10 AM