Permalink
Browse files

[FIX] base: print report without template

In case a report has no template defined, the fallback is on the first
body_parent that matched the xpath '//main'
xpath method returns a list

Fixes #27406

closes #27630
  • Loading branch information...
mart-e committed Oct 10, 2018
1 parent 0aa0cec commit 51d9589e02be582545310993bd697ea81aee34d6
Showing with 1 addition and 1 deletion.
  1. +1 −1 odoo/addons/base/models/ir_actions_report.py
@@ -305,7 +305,7 @@ def _prepare_html(self, html):
bodies = [] bodies = []
res_ids = [] res_ids = []
body_parent = root.xpath('//main') body_parent = root.xpath('//main')[0]
# Retrieve headers # Retrieve headers
for node in root.xpath(match_klass.format('header')): for node in root.xpath(match_klass.format('header')):
body_parent = node.getparent() body_parent = node.getparent()

0 comments on commit 51d9589

Please sign in to comment.