There was an error while loading. Please reload this page.
1 parent 4187061 commit 673d6b3Copy full SHA for 673d6b3
1 file changed
openupgrade_scripts/scripts/project_todo/19.0.1.0/pre-migration.py
@@ -0,0 +1,17 @@
1
+from openupgradelib import openupgrade
2
+
3
4
+@openupgrade.migrate()
5
+def migrate(env, version):
6
+ """Clear the 'to-do' action path before the module data reloads.
7
8
+ 19.0 adds a unique ``ir.actions.path``. On a fresh install only the
9
+ act_window ``project_task_action_todo`` owns 'to-do'; during migration the
10
+ pre-existing server action also gets 'to-do' auto-populated, so when the
11
+ window action's view data reloads it trips the cross-table uniqueness
12
+ check. Null both here; the view data reload re-sets the window action.
13
+ """
14
+ for table in ("ir_act_window", "ir_act_server"):
15
+ openupgrade.logged_query(
16
+ env.cr, f"UPDATE {table} SET path = NULL WHERE path = 'to-do'"
17
+ )
0 commit comments