[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 odoo/odoo#27630
This commit is contained in:
Martin Trigaux
2018-10-10 13:59:02 +00:00
parent 0aa0cec97a
commit 51d9589e02
+1 -1
View File
@@ -305,7 +305,7 @@ class IrActionsReport(models.Model):
bodies = []
res_ids = []
body_parent = root.xpath('//main')
body_parent = root.xpath('//main')[0]
# Retrieve headers
for node in root.xpath(match_klass.format('header')):
body_parent = node.getparent()