Reviewers: ,
Please review this at http://codereview.tryton.org/213002/ Affected files: M invoice.py Index: invoice.py =================================================================== --- a/invoice.py +++ b/invoice.py @@ -190,16 +190,17 @@ class Invoice(ModelWorkflow, ModelSQL, M if (table.column_exist('invoice_report') and table.column_exist('invoice_report_cache')): cursor.execute('SELECT id, invoice_report ' 'FROM "' + self._table + '"') for invoice_id, report in cursor.fetchall(): if report: report = base64.decodestring(str(report)) + report = FIELDS['binary'].sql_format(report) cursor.execute('UPDATE "' + self._table + '" ' 'SET invoice_report_cache = %s ' 'WHERE id = %s', (report, invoice_id)) table.drop_column('invoice_report') # Add index on create_date table.index_action('create_date', action='add') -- tryton-dev@googlegroups.com mailing list