Small fixes for v12/python3 standard
Co-Authored-By: David Beal <david.beal@akretion.com>pull/582/head
parent
fa75f07ede
commit
3f46e44057
|
@ -1,7 +1,7 @@
|
||||||
# Copyright 2019 Akretion
|
# Copyright 2019 Akretion
|
||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
from openerp import api, exceptions, fields, models, _
|
from odoo import api, exceptions, fields, models, _
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import logging
|
import logging
|
||||||
import base64
|
import base64
|
||||||
|
@ -67,10 +67,10 @@ class SqlExport(models.Model):
|
||||||
if self.file_format == 'excel':
|
if self.file_format == 'excel':
|
||||||
return 'xlsx'
|
return 'xlsx'
|
||||||
else:
|
else:
|
||||||
return super(SqlExport, self)._get_file_extension()
|
return super()._get_file_extension()
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def excel_get_datas_from_query(self, variable_dict):
|
def excel_get_data_from_query(self, variable_dict):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
res = self._execute_sql_request(
|
res = self._execute_sql_request(
|
||||||
params=variable_dict, mode='fetchall', header=self.header)
|
params=variable_dict, mode='fetchall', header=self.header)
|
||||||
|
|
|
@ -18,7 +18,7 @@ except ImportError:
|
||||||
class TestExportSqlQueryExcel(TransactionCase):
|
class TestExportSqlQueryExcel(TransactionCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestExportSqlQueryExcel, self).setUp()
|
super().setUp()
|
||||||
self.wizard_obj = self.env['sql.file.wizard']
|
self.wizard_obj = self.env['sql.file.wizard']
|
||||||
|
|
||||||
def get_workbook_from_query(self, wizard):
|
def get_workbook_from_query(self, wizard):
|
||||||
|
|
Loading…
Reference in New Issue