From d0cb8b045da2a48fb380a029e6449e46f6dbbdca Mon Sep 17 00:00:00 2001 From: Angel Moya - PESOL Date: Tue, 11 Apr 2017 19:31:32 +0200 Subject: [PATCH] [10] FIX format parameter (#84) * FIX format parameter To be able to print files in raw format it's needed to set this parameter. Previous code was not able to print raw files, but it didn't get error because 'format' used on line 107 is assumed as a format funtion, because format parameter was not on this scope. * FIX pep8 --- base_report_to_printer/models/printing_printer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base_report_to_printer/models/printing_printer.py b/base_report_to_printer/models/printing_printer.py index 6173938..a3c078e 100644 --- a/base_report_to_printer/models/printing_printer.py +++ b/base_report_to_printer/models/printing_printer.py @@ -117,10 +117,11 @@ class PrintingPrinter(models.Model): finally: os.close(fd) - return self.print_file(file_name, report=report, copies=copies) + return self.print_file( + file_name, report=report, copies=copies, format=format) @api.multi - def print_file(self, file_name, report=None, copies=1): + def print_file(self, file_name, report=None, copies=1, format=None): """ Print a file """ self.ensure_one()