diff --git a/stock_inventory_preparation_filter/migrations/13.0.1.0.0/post-migration.py b/stock_inventory_preparation_filter/migrations/13.0.1.0.0/post-migration.py deleted file mode 100644 index 7061981d9..000000000 --- a/stock_inventory_preparation_filter/migrations/13.0.1.0.0/post-migration.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2020 Tecnativa - Sergio Teruel -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). - -from openupgradelib import openupgrade - - -def convert_m2o_to_x2m_fields(env): - openupgrade.m2o_to_x2m( - env.cr, - env["stock.inventory"], - "stock_inventory", - "location_ids", - openupgrade.get_legacy_name("location_id"), - ) - openupgrade.m2o_to_x2m( - env.cr, - env["stock.inventory"], - "stock_inventory", - "product_ids", - openupgrade.get_legacy_name("product_id"), - ) - openupgrade.m2o_to_x2m( - env.cr, - env["stock.inventory"], - "stock_inventory", - "categ_ids", - openupgrade.get_legacy_name("category_id"), - ) - openupgrade.m2o_to_x2m( - env.cr, - env["stock.inventory"], - "stock_inventory", - "lot_ids", - openupgrade.get_legacy_name("lot_id"), - ) - - -@openupgrade.migrate() -def migrate(env, version): - convert_m2o_to_x2m_fields(env) diff --git a/stock_inventory_preparation_filter/migrations/13.0.1.0.0/pre-migration.py b/stock_inventory_preparation_filter/migrations/13.0.1.0.0/pre-migration.py deleted file mode 100644 index 0fc810b2c..000000000 --- a/stock_inventory_preparation_filter/migrations/13.0.1.0.0/pre-migration.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2020 Tecnativa - Sergio Teruel -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). - -from openupgradelib import openupgrade - -column_renames = { - "stock_inventory": [ - ("location_id", None), - ("product_id", None), - ("category_id", None), - ("lot_id", None), - ] -} - - -@openupgrade.migrate() -def migrate(env, version): - openupgrade.rename_columns(env.cr, column_renames)