Skip to content

Commit

Permalink
[IMP] do not delete when still used in extra module
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiocorato committed Aug 23, 2024
1 parent a6bbb23 commit 9000ede
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions openupgrade_scripts/scripts/mrp/14.0.2.0/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ def fill_mrp_routing_workcenter_bom_id(env):
JOIN mrp_routing_workcenter mrw2 ON mrw.old_routing_workcenter_id = mrw2.id
WHERE sm.raw_material_production_id = mp.id AND sm.operation_id = mrw2.id""",
)
openupgrade.logged_query(
env.cr,
"""
DELETE FROM mrp_routing_workcenter
WHERE old_routing_workcenter_id IS NULL""",
)
if not openupgrade.table_exists(env.cr, "mrp_bom_operation"):
openupgrade.logged_query(
env.cr,
"""
DELETE FROM mrp_routing_workcenter
WHERE old_routing_workcenter_id IS NULL""",
)


@openupgrade.migrate()
Expand Down

0 comments on commit 9000ede

Please sign in to comment.