mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
When get_pdf has no printer, just create the pdf file
And do not print anything, instead of raising an error.
This commit is contained in:
@@ -32,11 +32,9 @@ class ReportXMLAction(models.Model):
|
||||
)
|
||||
|
||||
@api.multi
|
||||
def behaviour(self, raise_if_no_printer=True):
|
||||
def behaviour(self):
|
||||
self.ensure_one()
|
||||
res = super(ReportXMLAction, self).behaviour(
|
||||
raise_if_no_printer=raise_if_no_printer
|
||||
)
|
||||
res = super(ReportXMLAction, self).behaviour()
|
||||
res['tray'] = self.printer_tray_id.system_name
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user