[MIG][13.0] report_xml: Migration to 13.0

This commit is contained in:
Tatiana Deribina
2019-12-23 15:49:33 +02:00
committed by Enric Tobella
parent e2869482c9
commit 9df5049644
21 changed files with 428 additions and 125 deletions

View File

@@ -13,7 +13,7 @@ class TestXmlReport(common.TransactionCase):
report = report_object._get_report_from_name(report_name)
docs = self.env["res.company"].search([], limit=1)
self.assertEqual(report.report_type, "qweb-xml")
rep = report.render(docs.ids, {})
root = etree.fromstring(rep[0])
el = root.xpath("/root/user/name")
result_report = report.render(docs.ids, {})
result_tree = etree.fromstring(result_report[0])
el = result_tree.xpath("/root/user/name")
self.assertEqual(el[0].text, docs.ensure_one().name)