summaryrefslogtreecommitdiff
path: root/addons/report/models/report.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-09-22 15:23:45 +0200
committerChristophe Simonis <chs@odoo.com>2016-09-22 15:23:45 +0200
commit856476d4418390ca89ef161e31faf61248eeaa1d (patch)
treef87ab29316440a28e9032d1b811eeb7ea5155653 /addons/report/models/report.py
parent4b812d9965128b02b4ac5ea49a66da622953cddc (diff)
parentb1b700adb1f26bb43e8f4b77b85f969a4b52d36c (diff)
[MERGE] forward port branch saas-12 up to b1b700a
Diffstat (limited to 'addons/report/models/report.py')
-rw-r--r--addons/report/models/report.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/report/models/report.py b/addons/report/models/report.py
index 45a9bd8c346..2eed9824bf2 100644
--- a/addons/report/models/report.py
+++ b/addons/report/models/report.py
@@ -136,8 +136,7 @@ class Report(models.Model):
'doc_model': report.model,
'docs': docs,
}
- return self.render(report.report_name, docargs).encode('utf-8')
-
+ return self.render(report.report_name, docargs)
@api.model
def get_pdf(self, docids, report_name, html=None, data=None):
"""This method generates and returns pdf version of a report.
@@ -172,6 +171,8 @@ class Report(models.Model):
if isinstance(self.env.cr, TestCursor):
return html
+ html = html.decode('utf-8') # Ensure the current document is utf-8 encoded.
+
# Get the ir.actions.report.xml record we are working on.
report = self._get_report_from_name(report_name)
# Check if we have to save the report or if we have to get one from the db.