diff --git a/account_payment_order/migrations/15.0.2.0.0/post-migration.py b/account_payment_order/migrations/15.0.2.0.0/post-migration.py index be62ed2ab..173de3d86 100644 --- a/account_payment_order/migrations/15.0.2.0.0/post-migration.py +++ b/account_payment_order/migrations/15.0.2.0.0/post-migration.py @@ -177,3 +177,6 @@ def migrate(env, version): ) _delete_hooks(env) _insert_payment_line_payment_link(env) + openupgrade.delete_records_safely_by_xml_id( + env, ["account_payment_order.bank_payment_line_company_rule"] + ) diff --git a/account_payment_order/migrations/15.0.2.0.0/pre-migration.py b/account_payment_order/migrations/15.0.2.0.0/pre-migration.py new file mode 100644 index 000000000..ec25c07e9 --- /dev/null +++ b/account_payment_order/migrations/15.0.2.0.0/pre-migration.py @@ -0,0 +1,8 @@ +# Copyright 2023 ForgeFlow S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.remove_tables_fks(env.cr, ["bank_payment_line"])