[MIG] sql_export_excel: Migration to 14.0
parent
3b578f7a4b
commit
12fdc9c5c5
|
@ -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",
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
* Florian da Costa <florian.dacosta@akretion.com>
|
||||
* Helly kapatel <helly.kapatel@initos.com>
|
||||
|
|
Loading…
Reference in New Issue