Skip to content

Commit

Permalink
[OU-IMP] project: merge project_task_milestone
Browse files Browse the repository at this point in the history
  • Loading branch information
remytms committed Apr 17, 2024
1 parent a0f2db1 commit f242de2
Show file tree
Hide file tree
Showing 2 changed files with 14 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 @@ -88,6 +88,8 @@
# OCA/pos
"pos_order_line_no_unlink": "point_of_sale",
"pos_product_sort": "point_of_sale",
# OCA/project
"project_task_milestone": "project",
# OCA/purchase-workflow
"product_form_purchase_link": "purchase",
# OCA/sale-promotion
Expand Down
12 changes: 12 additions & 0 deletions openupgrade_scripts/scripts/project/16.0.1.2/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ def _fill_project_allow_milestones(env):
)


def _rename_project_task_milestone_project_task_ids(env):
"""If module project_task_milestone is installed then rename column
project_task_ids to task_ids
"""
if openupgrade.column_exists(env.cr, "project_milestone", "project_task_ids"):
openupgrade.rename_columns(
env.cr,
{"project_milestone": [("project_task_ids", "task_ids")]},
)


@openupgrade.migrate()
def migrate(env, version):
openupgrade.add_fields(env, _new_fields)
Expand All @@ -163,6 +174,7 @@ def migrate(env, version):
_fill_project_last_update_status_if_null(env)
_compute_project_task_ancestor_id(env)
_compute_project_task_is_analytic_account_id_changed(env)
_rename_project_task_milestone_project_task_ids(env)

# Remove SQL view project_task_burndown_chart_report not used anymore in Odoo v16.0
openupgrade.logged_query(
Expand Down

0 comments on commit f242de2

Please sign in to comment.