mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] sql_export_excel: pylint
This commit is contained in:
committed by
Florian da Costa
parent
a66df4026f
commit
a09944e90f
@@ -93,13 +93,13 @@ class SqlExport(models.Model):
|
||||
sheets = wb.worksheets
|
||||
try:
|
||||
ws = sheets[self.sheet_position - 1]
|
||||
except IndexError:
|
||||
except IndexError as err:
|
||||
raise exceptions.ValidationError(
|
||||
_(
|
||||
"The Excel Template file contains less than %s sheets "
|
||||
"Please, adjust the Sheet Position parameter."
|
||||
)
|
||||
)
|
||||
) from err
|
||||
row_position = self.row_position or 1
|
||||
col_position = self.col_position or 1
|
||||
# Case of excel file creation
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="sql_export_excel_view_form" model="ir.ui.view">
|
||||
<field name="model">sql.export</field>
|
||||
@@ -9,28 +7,27 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="file_format" position="after">
|
||||
<field
|
||||
name="header"
|
||||
attrs="{'invisible': [('file_format', '=', 'csv')]}"
|
||||
/>
|
||||
name="header"
|
||||
attrs="{'invisible': [('file_format', '=', 'csv')]}"
|
||||
/>
|
||||
<field
|
||||
name="attachment_id"
|
||||
attrs="{'invisible': [('file_format', '!=', 'excel')]}"
|
||||
/>
|
||||
name="attachment_id"
|
||||
attrs="{'invisible': [('file_format', '!=', 'excel')]}"
|
||||
/>
|
||||
<field
|
||||
name="sheet_position"
|
||||
attrs="{'invisible': [('attachment_id', '=', False)]}"
|
||||
/>
|
||||
name="sheet_position"
|
||||
attrs="{'invisible': [('attachment_id', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="row_position"
|
||||
attrs="{'invisible': [('attachment_id', '=', False)]}"
|
||||
/>
|
||||
name="row_position"
|
||||
attrs="{'invisible': [('attachment_id', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="col_position"
|
||||
attrs="{'invisible': [('attachment_id', '=', False)]}"
|
||||
/>
|
||||
name="col_position"
|
||||
attrs="{'invisible': [('attachment_id', '=', False)]}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user