Skip to content

Commit

Permalink
Merge pull request #484 from ForgeFlow/15.0-fix-stock_barcodes-migration
Browse files Browse the repository at this point in the history
[15.0][FIX] stock_barcodes: add migration script
  • Loading branch information
pedrobaeza authored Feb 16, 2023
2 parents b6954ae + aafd75b commit 6aad064
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions stock_barcodes/migrations/15.0.1.0.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 ForgeFlow <http://www.forgeflow.com>
# 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)

0 comments on commit 6aad064

Please sign in to comment.