mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[IMP] base_report_to_printer: black, isort, prettier
This commit is contained in:
committed by
John Herholz
parent
535e2c9d5d
commit
3a22073a87
@@ -35,7 +35,7 @@ class IrActionsReport(models.Model):
|
||||
|
||||
@api.onchange("printing_printer_id")
|
||||
def onchange_printing_printer_id(self):
|
||||
""" Reset the tray when the printer is changed """
|
||||
"""Reset the tray when the printer is changed"""
|
||||
self.printer_tray_id = False
|
||||
|
||||
@api.model
|
||||
@@ -99,7 +99,7 @@ class IrActionsReport(models.Model):
|
||||
return result
|
||||
|
||||
def print_document(self, record_ids, data=None):
|
||||
""" Print a document, do not return the document file """
|
||||
"""Print a document, do not return the document file"""
|
||||
document, doc_format = self.with_context(
|
||||
must_skip_send_to_printer=True
|
||||
)._render_qweb_pdf(record_ids, data=data)
|
||||
|
||||
@@ -173,7 +173,7 @@ class PrintingPrinter(models.Model):
|
||||
return options
|
||||
|
||||
def print_file(self, file_name, report=None, **print_opts):
|
||||
""" Print a file """
|
||||
"""Print a file"""
|
||||
self.ensure_one()
|
||||
title = print_opts.pop("title", file_name)
|
||||
connection = self.server_id._open_connection(raise_on_error=True)
|
||||
|
||||
@@ -35,7 +35,7 @@ class PrintingReportXmlAction(models.Model):
|
||||
|
||||
@api.onchange("printer_id")
|
||||
def onchange_printer_id(self):
|
||||
""" Reset the tray when the printer is changed """
|
||||
"""Reset the tray when the printer is changed"""
|
||||
self.printer_tray_id = False
|
||||
|
||||
def behaviour(self):
|
||||
|
||||
@@ -38,5 +38,5 @@ class ResUsers(models.Model):
|
||||
|
||||
@api.onchange("printing_printer_id")
|
||||
def onchange_printing_printer_id(self):
|
||||
""" Reset the tray when the printer is changed """
|
||||
"""Reset the tray when the printer is changed"""
|
||||
self.printer_tray_id = False
|
||||
|
||||
Reference in New Issue
Block a user