[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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user