From 59423bb407bc0f30805fed32158dcea05dd4a9cf Mon Sep 17 00:00:00 2001 From: Don Kendall Date: Sat, 13 Jun 2026 21:25:29 -0400 Subject: [PATCH] [OU-FIX] project_todo: clear 'to-do' action path before reload --- .../project_todo/19.0.1.0/pre-migration.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 openupgrade_scripts/scripts/project_todo/19.0.1.0/pre-migration.py diff --git a/openupgrade_scripts/scripts/project_todo/19.0.1.0/pre-migration.py b/openupgrade_scripts/scripts/project_todo/19.0.1.0/pre-migration.py new file mode 100644 index 000000000000..84296f357ac7 --- /dev/null +++ b/openupgrade_scripts/scripts/project_todo/19.0.1.0/pre-migration.py @@ -0,0 +1,17 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + """Clear the 'to-do' action path before the module data reloads. + + 19.0 adds a unique ``ir.actions.path``. On a fresh install only the + act_window ``project_task_action_todo`` owns 'to-do'; during migration the + pre-existing server action also gets 'to-do' auto-populated, so when the + window action's view data reloads it trips the cross-table uniqueness + check. Null both here; the view data reload re-sets the window action. + """ + for table in ("ir_act_window", "ir_act_server"): + openupgrade.logged_query( + env.cr, f"UPDATE {table} SET path = NULL WHERE path = 'to-do'" + )