Reformatted after template update

This commit is contained in:
Enric Tobella
2022-09-01 11:04:43 +02:00
parent 479efcaa46
commit 0203e5b621
25 changed files with 136 additions and 126 deletions

View File

@@ -35,12 +35,12 @@ 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
def print_action_for_report_name(self, report_name):
""" Returns if the action is a direct print or pdf
"""Returns if the action is a direct print or pdf
Called from js
"""
@@ -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)
@@ -143,7 +143,7 @@ class IrActionsReport(models.Model):
return res
def render_qweb_pdf(self, res_ids=None, data=None):
""" Generate a PDF and returns it.
"""Generate a PDF and returns it.
If the action configured on the report is server, it prints the
generated document as well.

View File

@@ -132,7 +132,7 @@ class PrintingPrinter(models.Model):
return vals
def print_document(self, report, content, **print_opts):
""" Print a file
"""Print a file
Format could be pdf, qweb-pdf, raw, ...
"""
self.ensure_one()
@@ -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)

View File

@@ -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):

View File

@@ -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