diff --git a/sql_export_excel/__manifest__.py b/sql_export_excel/__manifest__.py index 7e2f5d13c..3562741c8 100644 --- a/sql_export_excel/__manifest__.py +++ b/sql_export_excel/__manifest__.py @@ -3,15 +3,13 @@ { "name": "SQL Export Excel", - "version": "12.0.1.1.0", + "version": "14.0.1.1.0", "author": "Akretion,Odoo Community Association (OCA)", "website": "https://github.com/OCA/server-tools", "license": "AGPL-3", "category": "Generic Modules/Others", "summary": "Allow to export a sql query to an excel file.", - "depends": [ - "sql_export", - ], + "depends": ["sql_export"], "external_dependencies": { "python": [ "openpyxl", diff --git a/sql_export_excel/models/sql_export.py b/sql_export_excel/models/sql_export.py index 01a3f20f4..6165abe48 100644 --- a/sql_export_excel/models/sql_export.py +++ b/sql_export_excel/models/sql_export.py @@ -18,7 +18,9 @@ except ImportError: class SqlExport(models.Model): _inherit = "sql.export" - file_format = fields.Selection(selection_add=[("excel", "Excel")]) + file_format = fields.Selection( + selection_add=[("excel", "Excel")], ondelete={"excel": "set default"} + ) header = fields.Boolean( default=True, help="Indicate if the header should be exported to the file." ) @@ -69,7 +71,6 @@ class SqlExport(models.Model): _("The column position can't be less than 1.") ) - @api.multi def _get_file_extension(self): self.ensure_one() if self.file_format == "excel": @@ -77,7 +78,6 @@ class SqlExport(models.Model): else: return super()._get_file_extension() - @api.multi def excel_get_data_from_query(self, variable_dict): self.ensure_one() res = self._execute_sql_request( diff --git a/sql_export_excel/readme/CONTRIBUTORS.rst b/sql_export_excel/readme/CONTRIBUTORS.rst index 0bddb053a..c2183a83d 100644 --- a/sql_export_excel/readme/CONTRIBUTORS.rst +++ b/sql_export_excel/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Florian da Costa <florian.dacosta@akretion.com> +* Helly kapatel <helly.kapatel@initos.com>