Browse Source

Return supers.

pull/168/head
Jairo Llopis 9 years ago
committed by Enric Tobella
parent
commit
4dc8779540
  1. 5
      report_xml/models.py

5
report_xml/models.py

@ -17,7 +17,7 @@ class ReportAction(models.Model):
def _lookup_report(self, cr, name): def _lookup_report(self, cr, name):
"""Enable ``qweb-xml`` report lookup.""" """Enable ``qweb-xml`` report lookup."""
try: try:
super(ReportAction, self)._lookup_report(cr, name)
return super(ReportAction, self)._lookup_report(cr, name)
except Exception as ex: except Exception as ex:
# Somebody thought it was a good idea to use standard exceptions # Somebody thought it was a good idea to use standard exceptions
if "qweb-xml" not in ex.message: if "qweb-xml" not in ex.message:
@ -53,7 +53,8 @@ class ReportGenerator(models.Model):
def _get_report_from_name(self, report_name): def _get_report_from_name(self, report_name):
"""Allow to view ``qweb-xml`` reports as web pages.""" """Allow to view ``qweb-xml`` reports as web pages."""
try: try:
super(ReportGenerator, self)._get_report_from_name(report_name)
return (super(ReportGenerator, self)
._get_report_from_name(report_name))
except IndexError: except IndexError:
return self.env["ir.actions.report.xml"].search( return self.env["ir.actions.report.xml"].search(
[("report_type", "=", "qweb-xml"), [("report_type", "=", "qweb-xml"),

Loading…
Cancel
Save