Skip to content

Commit

Permalink
[OU-IMP] project: try fix project_status migration
Browse files Browse the repository at this point in the history
  • Loading branch information
remytms committed Apr 21, 2024
1 parent f69c70a commit 3fb5833
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
1 change: 0 additions & 1 deletion openupgrade_scripts/apriori.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
"survey_description": "survey",
# OCA/project
"project_mail_chatter": "project",
"project_status": "project",
"project_task_dependency": "project",
"project_timeline_task_dependency": "project_timeline",
# OCA/timesheet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def _activate_project_stages_conditionally(env):
stage_group = env.ref("project.group_project_stages")
internal_group.implied_ids += stage_group

_logger.info("marking project_status as to be removed")
#_logger.info("marking project_status as uninstalled")
#project_status.state = "uninstalled"
#env["ir.module.module"].search(
# [("name", "=", "project_status")], limit=1
#).button_immediate_uninstall()
Expand Down
34 changes: 17 additions & 17 deletions openupgrade_scripts/scripts/project/15.0.1.2/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,27 @@ def migrate_project_status(env):
)
# Remove project_status views
xmlids_views = [
"project.project_status_seq",
"project.project_status_view_list",
"project.project_status_action",
"project.project_status_menu",
"project.view_project",
"project.edit_project",
"project.project_project_view_form_simplified",
"project.project_view_kanban",
"project.view_project_project_filter",
"project_status.project_status_seq",
"project_status.project_status_view_list",
"project_status.project_status_action",
"project_status.project_status_menu",
"project_status.view_project",
"project_status.edit_project",
"project_status.project_project_view_form_simplified",
"project_status.project_view_kanban",
"project_status.view_project_project_filter",
]
xmlids_security = [
"project_status.project_status_company_rule",
"project_status.project_status_user",
"project_status.project_status_manager",
]
#xmlids_security = [
# "project.project_status_company_rule",
# "project.project_status_user",
# "project.project_status_manager",
#]
openupgrade.delete_records_safely_by_xml_id(
env, xmlids_views, delete_childs=False
)
#openupgrade.delete_records_safely_by_xml_id(
# env, xmlids_security, delete_childs=False
#)
openupgrade.delete_records_safely_by_xml_id(
env, xmlids_security, delete_childs=False
)


@openupgrade.migrate()
Expand Down

0 comments on commit 3fb5833

Please sign in to comment.