Skip to content

Commit 2581e7e

Browse files
committed
[FIX] update_field_usage: handle dotted expression for the old argument
The filter, export line and aliases can only be updated if `old` is a direct field. Part-of: #40
1 parent ae1a900 commit 2581e7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/fields.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,8 @@ def _update_field_usage_multi(cr, models, old, new, domain_adapter=None, skip_in
879879
format="html",
880880
)
881881

882-
# if we don't replace the field by a dotted-path alternative (only works for domains and related)
883-
if "." not in new:
882+
# if we stay on the same model. (no usage of dotted-path) (only works for domains and related)
883+
if "." not in old and "." not in new:
884884
# ir.filters
885885
col_prefix = ""
886886
if not column_exists(cr, "ir_filters", "sort"):

0 commit comments

Comments
 (0)