mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] report_xml: black, isort, prettier
This commit is contained in:
@@ -32,7 +32,7 @@ class ReportController(report.ReportController):
|
||||
del data["context"]["lang"]
|
||||
context.update(data["context"])
|
||||
|
||||
xml = report.with_context(context)._render_qweb_xml(docids, data=data)[0]
|
||||
xml = report.with_context(**context)._render_qweb_xml(docids, data=data)[0]
|
||||
xmlhttpheaders = [
|
||||
("Content-Type", "text/xml"),
|
||||
("Content-Length", len(xml)),
|
||||
@@ -56,7 +56,10 @@ class ReportController(report.ReportController):
|
||||
if docids:
|
||||
# Generic report:
|
||||
response = self.report_routes(
|
||||
reportname, docids=docids, converter="xml", context=context
|
||||
reportname,
|
||||
docids=docids,
|
||||
converter="xml",
|
||||
context=context,
|
||||
)
|
||||
else:
|
||||
# Particular report:
|
||||
|
||||
@@ -103,7 +103,7 @@ class ReportXmlAbstract(models.AbstractModel):
|
||||
# check content
|
||||
etree.fromstring(content, parser)
|
||||
except etree.XMLSyntaxError as error:
|
||||
raise ValidationError(error.msg)
|
||||
raise ValidationError(error.msg) from error
|
||||
return True
|
||||
|
||||
@api.model
|
||||
|
||||
Reference in New Issue
Block a user