From 98f42b29207bfb8aed794e723e7489a825fa41d5 Mon Sep 17 00:00:00 2001 From: Oscar Ulises Garza Cordova Date: Fri, 22 Jun 2018 08:38:29 -0500 Subject: [PATCH] [FIX][base_report_to_printer] - behaviour to print the report succesfully. --- base_report_to_printer/__manifest__.py | 2 +- base_report_to_printer/models/ir_actions_report.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/base_report_to_printer/__manifest__.py b/base_report_to_printer/__manifest__.py index aa0ed0b..998f1f8 100644 --- a/base_report_to_printer/__manifest__.py +++ b/base_report_to_printer/__manifest__.py @@ -8,7 +8,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)", diff --git a/base_report_to_printer/models/ir_actions_report.py b/base_report_to_printer/models/ir_actions_report.py index e316f06..a490ccc 100644 --- a/base_report_to_printer/models/ir_actions_report.py +++ b/base_report_to_printer/models/ir_actions_report.py @@ -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.