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:
Guewen Baconnier
2015-01-26 11:55:26 +01:00
parent 4c803da0e2
commit 5cc2eec8d6
3 changed files with 12 additions and 14 deletions

View File

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