Skip to content

Commit 7e33240

Browse files
committed
[FIX] util/domains: edit_view switched active
Part of odoo/upgrade#5156 Signed-off-by: Alvaro Fuentes Suarez (afu) <[email protected]>
1 parent a42f828 commit 7e33240

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/domains.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ def adapt_domains(cr, model, old, new, adapter=None, skip_inherit=(), force_adap
295295
arch_db = get_value_or_en_translation(cr, "ir_ui_view", "arch_db")
296296
cr.execute("SELECT id, model FROM ir_ui_view WHERE {} ~ %s".format(arch_db), [match_old])
297297
for view_id, view_model in cr.fetchall():
298-
with edit_view(cr, view_id=view_id) as view:
298+
# Note: active=None is important to not reactivate views!
299+
with edit_view(cr, view_id=view_id, active=None) as view:
299300
for node in view.xpath(
300301
"//filter[contains(@domain, '{0}')]|//field[contains(@filter_domain, '{0}')]".format(old)
301302
):

0 commit comments

Comments
 (0)