diff --git a/invoice.py b/invoice.py index adb6855a7e..88619b547f 100644 --- a/invoice.py +++ b/invoice.py @@ -194,7 +194,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): 'FROM "' + self._table + '"') for invoice_id, report in cursor.fetchall(): if report: - report = base64.decodestring(str(report)) + report = buffer(base64.decodestring(str(report))) cursor.execute('UPDATE "' + self._table + '" ' 'SET invoice_report_cache = %s ' 'WHERE id = %s', (report, invoice_id))