diff --git a/sql_export/sql_export.py b/sql_export/sql_export.py index 7ae3bdc91..c3964e47c 100644 --- a/sql_export/sql_export.py +++ b/sql_export/sql_export.py @@ -20,7 +20,7 @@ ############################################################################## import re -from openerp import models, fields, api, _, exceptions +from openerp import models, fields, api class SqlExport(models.Model): diff --git a/sql_export/wizard/wizard_file.py b/sql_export/wizard/wizard_file.py index 500ff928b..e1174d712 100644 --- a/sql_export/wizard/wizard_file.py +++ b/sql_export/wizard/wizard_file.py @@ -97,10 +97,10 @@ class SqlFileWizard(models.TransientModel): output.close() finally: self.env.cr.execute("ROLLBACK TO SAVEPOINT %s" % name) - wiz = self.write( - { - 'binary_file': new_output, - 'file_name': sql_export.name + '_' + date + '.csv'}) + self.write({ + 'binary_file': new_output, + 'file_name': sql_export.name + '_' + date + '.csv' + }) if not sql_export.valid: sql_export.sudo().valid = True return {