diff --git a/stock_barcodes/migrations/15.0.1.0.0/pre-migration.py b/stock_barcodes/migrations/15.0.1.0.0/pre-migration.py new file mode 100644 index 000000000000..8df703cba910 --- /dev/null +++ b/stock_barcodes/migrations/15.0.1.0.0/pre-migration.py @@ -0,0 +1,14 @@ +# Copyright 2023 ForgeFlow +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + + +def delete_fk_constraints(env): + # delete obsolete model references + openupgrade.remove_tables_fks(env.cr, ["wiz_stock_barcodes_read_inventory"]) + + +@openupgrade.migrate() +def migrate(env, version): + delete_fk_constraints(env)