[IMP] sql_export: black, isort, prettier
parent
7588dad558
commit
bc9519c964
|
@ -0,0 +1 @@
|
|||
../../../../sql_export
|
|
@ -0,0 +1,6 @@
|
|||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
|
@ -6,7 +6,7 @@
|
|||
"name": "SQL Export",
|
||||
"version": "14.0.1.1.0",
|
||||
"author": "Akretion,Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/server-tools",
|
||||
"website": "https://github.com/OCA/reporting-engine",
|
||||
"license": "AGPL-3",
|
||||
"category": "Generic Modules/Others",
|
||||
"summary": "Export data in csv file with SQL requests",
|
||||
|
|
|
@ -15,9 +15,7 @@ class SqlExport(models.Model):
|
|||
|
||||
_check_execution_enabled = False
|
||||
|
||||
copy_options = fields.Char(
|
||||
string="Copy Options", required=False, default="CSV HEADER DELIMITER ';'"
|
||||
)
|
||||
copy_options = fields.Char(required=False, default="CSV HEADER DELIMITER ';'")
|
||||
|
||||
file_format = fields.Selection([("csv", "CSV")], default="csv", required=True)
|
||||
|
||||
|
@ -58,7 +56,6 @@ class SqlExport(models.Model):
|
|||
("windows-1251", "windows-1251"),
|
||||
("koir8_r", "koir8_r"),
|
||||
],
|
||||
string="Encoding",
|
||||
required=True,
|
||||
default="utf-8",
|
||||
)
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
<field name="name">Sql_export_tree_view</field>
|
||||
<field name="model">sql.export</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="SQL Export" decoration-info="state=='draft'">
|
||||
<tree decoration-info="state=='draft'">
|
||||
<field name="name" />
|
||||
<field name="state" />
|
||||
<button
|
||||
|
@ -172,7 +172,7 @@
|
|||
<field name="model">ir.model.fields</field>
|
||||
<field name="priority">150</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="SQL Parameter">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="field_description" />
|
||||
<field name="ttype" />
|
||||
|
|
|
@ -16,7 +16,7 @@ class SqlFileWizard(models.TransientModel):
|
|||
_description = "Allow the user to save the file with sql request's data"
|
||||
|
||||
binary_file = fields.Binary("File", readonly=True)
|
||||
file_name = fields.Char("File Name", readonly=True)
|
||||
file_name = fields.Char(readonly=True)
|
||||
sql_export_id = fields.Many2one(comodel_name="sql.export", required=True)
|
||||
|
||||
@api.model
|
||||
|
|
|
@ -1,42 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="sql_file_wizard_view_form" model="ir.ui.view">
|
||||
<field name="name">sql.file.wizard.view.form</field>
|
||||
<field name="model">sql.file.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Csv File">
|
||||
<separator
|
||||
string="variables_placeholder"
|
||||
colspan="4"
|
||||
invisible="1"
|
||||
/>
|
||||
string="variables_placeholder"
|
||||
colspan="4"
|
||||
invisible="1"
|
||||
/>
|
||||
<separator
|
||||
string="Export file"
|
||||
colspan="4"
|
||||
attrs="{'invisible': [('binary_file', '=', False)]}"
|
||||
/>
|
||||
string="Export file"
|
||||
colspan="4"
|
||||
attrs="{'invisible': [('binary_file', '=', False)]}"
|
||||
/>
|
||||
<field name="binary_file" filename="file_name" />
|
||||
<field name="file_name" invisible="1" />
|
||||
<footer>
|
||||
<button
|
||||
name="export_sql"
|
||||
string="Export"
|
||||
type="object"
|
||||
icon="fa-download"
|
||||
/>
|
||||
name="export_sql"
|
||||
string="Export"
|
||||
type="object"
|
||||
icon="fa-download"
|
||||
/>
|
||||
or
|
||||
<button
|
||||
special="cancel"
|
||||
string="Cancel"
|
||||
type="object"
|
||||
icon="fa-times"
|
||||
/>
|
||||
special="cancel"
|
||||
string="Cancel"
|
||||
type="object"
|
||||
icon="fa-times"
|
||||
/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
Loading…
Reference in New Issue