Skip to content

Commit c22f330

Browse files
authored
Merge pull request #5583 from Tecnativa/18.0-fix-base-view-mode
[18.0][OU-FIX] base,sale: finish migration
2 parents dbff419 + 14dd75e commit c22f330

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

openupgrade_scripts/scripts/base/18.0.1.3/pre-migration.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ def migrate(cr, version):
7575
openupgrade.update_module_names(cr, merged_modules.items(), merge_modules=True)
7676
openupgrade.clean_transient_models(cr)
7777
openupgrade.rename_xmlids(cr, _renamed_xmlids)
78+
openupgrade.copy_columns(
79+
cr,
80+
{"ir_act_window_view": [("view_mode", None, None)]},
81+
)
82+
old_column = openupgrade.get_legacy_name("view_mode")
83+
openupgrade.map_values(
84+
cr,
85+
old_column,
86+
"view_mode",
87+
[("tree", "list")],
88+
table="ir_act_window_view",
89+
)
7890
_fix_list_view_type(cr)
7991
_fix_list_view_mode(cr)
8092
_fix_serbian_res_lang_record(cr)

openupgrade_scripts/scripts/base/18.0.1.3/upgrade_analysis_work.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ new model res.device.log
1212
---Fields in module 'base'---
1313
base / ir.actions.act_url / path (char) : NEW
1414
base / ir.actions.act_window / path (char) : NEW
15-
base / ir.actions.act_window.view / view_mode (selection) : selection_keys is now '['calendar', 'form', 'graph', 'kanban', 'list', 'pivot']' ('['calendar', 'form', 'gantt', 'graph', 'kanban', 'pivot', 'tree']')
1615
base / ir.actions.act_window_close / path (char) : NEW
1716
base / ir.actions.actions / path (char) : NEW
1817
base / ir.actions.client / path (char) : NEW
@@ -22,6 +21,9 @@ base / ir.actions.server / path (char) : NEW
2221

2322
# NOTHING TO DO: new functionality
2423

24+
base / ir.actions.act_window.view / view_mode (selection) : selection_keys is now '['calendar', 'form', 'graph', 'kanban', 'list', 'pivot']' ('['calendar', 'form', 'gantt', 'graph', 'kanban', 'pivot', 'tree']')
25+
# DONE: pre-migration: copied column for preservation and mapped values: tree -> list
26+
2527
base / ir.cron / doall (boolean) : DEL
2628

2729
# NOTHING TO DO: removed functionality

openupgrade_scripts/scripts/sale/18.0.1.2/pre-migration.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ def migrate(env, version):
1515
(
1616
"sale.sale_order_action_view_quotation_kanban",
1717
"sale.action_quotations_kanban",
18-
)
18+
),
19+
(
20+
"sale.sale_order_action_view_quotation_tree",
21+
"sale.action_quotations_tree",
22+
),
1923
],
2024
)
2125
openupgrade.add_columns(

0 commit comments

Comments
 (0)