mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_fiscal_year: avoid trigger of uninstall 'fiscalyear' date range type
This commit is contained in:
16
account_fiscal_year/migrations/15.0.1.0.0/pre-migration.py
Normal file
16
account_fiscal_year/migrations/15.0.1.0.0/pre-migration.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
openupgrade.logged_query(
|
||||
env.cr,
|
||||
"""
|
||||
DELETE FROM ir_model_data imd
|
||||
USING date_range_type drt
|
||||
WHERE imd.model = 'date.range.type' AND imd.res_id = drt.id
|
||||
AND imd.name = 'fiscalyear'""",
|
||||
)
|
||||
Reference in New Issue
Block a user