Hello
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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello
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
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 ??