Merge pull request #154 from Jarsa-dev/11.0-fix-js-call

[FIX][base_report_to_printer] - print documents with ir.actions.repor…
This commit is contained in:
Pedro M. Baeza
2018-06-25 18:08:32 +02:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

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

View File

@@ -129,6 +129,13 @@ class IrActionsReport(models.Model):
return True
return False
@api.noguess
def report_action(self, docids, data=None, config=True):
res = super().report_action(docids, data=data, config=config)
if not res.get('id'):
res['id'] = self.id
return res
def render_qweb_pdf(self, docids, data=None):
""" Generate a PDF and returns it.