Skip to content

Commit

Permalink
[OU-IMP] project: merge project_status
Browse files Browse the repository at this point in the history
  • Loading branch information
remytms committed Apr 17, 2024
1 parent e428b19 commit 9352a8c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openupgrade_scripts/apriori.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@
"stock.inventory": "stock.quant",
"stock.inventory.line": "stock.move.line",
}

merged_modules["project_status"] = "project"
23 changes: 23 additions & 0 deletions openupgrade_scripts/scripts/project/15.0.1.2/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,32 @@ def adapt_project_task_dependency(env):
)


def migrate_project_status(env):
"""Migrate project_status module if installed to
project.project.stages.
"""
if openupgrade.table_exists(env.cr, "project_status"):
openupgrade.rename_tables(
env.cr,
[("project_status", "project_project_stage")],
)
openupgrade.rename_columns(
env.cr,
{
"project_project_stage": [
("company_id", None),
("description", None),
("status_sequence", "sequence"),
("is_closed", None),
],
},
)


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_columns(env.cr, _column_renames)
adapt_project_task_dependency(env)
fill_project_project_allow_task_dependencies(env)
fill_project_project_last_update_status(env)
migrate_project_status(env)

0 comments on commit 9352a8c

Please sign in to comment.