Skip to content

Commit

Permalink
[OU-IMP] project: merge project_milestone
Browse files Browse the repository at this point in the history
Parts of the project_milestone feature are merged into the `project`
module and another part of the feature are moved to the
`project_task_milestone` module.
  • Loading branch information
remytms committed Apr 18, 2024
1 parent 27160dc commit 0b4072e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions openupgrade_scripts/apriori.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"website_sale_attribute_filter_order": "website_sale_product_attribute_filter_order",
# OCA/project
"project_category": "project_type",
"project_milestone": "project_task_milestone",
"project_stage_state": "project_task_stage_state",
"sale_project_service_tracking_copy_tasks": "sale_project_copy_tasks",
# OCA/sale-promotion
Expand Down
12 changes: 12 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,21 @@ def adapt_project_task_dependency(env):
)


def rename_project_milestone_target_date(env):
"""If project_milestone is installed then rename column target_date
to deadline.
"""
if openupgrade.column_exists(env.cr, "project_milestone", "target_date"):
openupgrade.rename_columns(
env.cr,
{"project_milestone": [("target_date", "deadline")]},
)


@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)
rename_project_milestone_target_date(env)

0 comments on commit 0b4072e

Please sign in to comment.