mirror of
https://github.com/brain-tec/account_ebics.git
synced 2025-08-14 06:35:36 +00:00
[IMP] account_ebics: pre-commit auto fixes
This commit is contained in:
@@ -8,7 +8,6 @@ from openupgradelib import openupgrade # pylint: disable=W7936
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
|
||||
_ebics_config_upgrade(env, version)
|
||||
_noupdate_changes(env, version)
|
||||
|
||||
|
@@ -27,9 +27,7 @@ def _update_file_format(cr, ff):
|
||||
"""
|
||||
SELECT res_id FROM ir_model_data
|
||||
WHERE module='account_ebics' AND name='{}'
|
||||
""".format(
|
||||
ff["xml_id_name"]
|
||||
)
|
||||
""".format(ff["xml_id_name"])
|
||||
)
|
||||
res = cr.fetchone()
|
||||
if res:
|
||||
|
@@ -57,9 +57,7 @@ def _update_file_format(cr, ff):
|
||||
"""
|
||||
SELECT id, res_id FROM ir_model_data
|
||||
WHERE module='account_ebics' AND name='{}'
|
||||
""".format(
|
||||
ff["old_xml_id_name"]
|
||||
)
|
||||
""".format(ff["old_xml_id_name"])
|
||||
)
|
||||
res = cr.fetchone()
|
||||
if res:
|
||||
@@ -67,15 +65,11 @@ def _update_file_format(cr, ff):
|
||||
UPDATE ir_model_data
|
||||
SET name='{new_xml_id_name}'
|
||||
WHERE id={xml_id};
|
||||
""".format(
|
||||
new_xml_id_name=ff["new_xml_id_name"], xml_id=res[0]
|
||||
)
|
||||
""".format(new_xml_id_name=ff["new_xml_id_name"], xml_id=res[0])
|
||||
if ff.get("new_name"):
|
||||
query += """
|
||||
UPDATE ebics_file_format
|
||||
SET name='{new_name}'
|
||||
WHERE id={ff_id};
|
||||
""".format(
|
||||
new_name=ff["new_name"], ff_id=res[1]
|
||||
)
|
||||
""".format(new_name=ff["new_name"], ff_id=res[1])
|
||||
cr.execute(query) # pylint: disable=E8103
|
||||
|
Reference in New Issue
Block a user