This commit is contained in:
Yannick Vaucher
2015-11-24 13:45:21 +01:00
2 changed files with 3 additions and 2 deletions

View File

@@ -23,7 +23,7 @@
##############################################################################
{
'name': "Report to printer",
'version': '8.0.0.1.1',
'version': '8.0.0.1.2',
'category': 'Generic Modules/Base',
'author': "Agile Business Group & Domsense, Pegueroles SCP, NaN,"
"Odoo Community Association (OCA)",

View File

@@ -42,7 +42,8 @@ class Report(models.Model):
raise exceptions.Warning(
_('No printer configured to print this report.')
)
return printer.print_document(report, document, report.report_type)
return printer.with_context(context).print_document(
report, document, report.report_type)
@api.v8
def print_document(self, records, report_name, html=None, data=None):