[MIG][13.0] report_xml: Migration to 13.0

This commit is contained in:
Tatiana Deribina
2019-12-23 15:49:33 +02:00
parent c553fd4f56
commit a78247dc1a
24 changed files with 435 additions and 126 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)