Do not compute domain inversion when displaying column that is not a field
Since c320a786923f the field is needed to compute domain inversion so we should not compute domain inversion for non field. Closes #12814 (grafted from fe581cde6705c4b2e7bad61894e0b3098ede65f3) --HG-- branch : 7.0
This commit is contained in:
1 parent
8ac6e71297
commit
e1b1491c2c
2 files changed
+3
-3
No files matched your search
@@ -878,7 +878,7 @@
|
||||
} else if (name === this.screen.exclude_field) {
|
||||
visible_columns -= 1;
|
||||
column.set_visible(false);
|
||||
} else {
|
||||
} else if (name in this.screen.model.fields) {
|
||||
const field = this.screen.model.fields[name];
|
||||
var inv_domain = inversion.domain_inversion(domain, name);
|
||||
if (typeof inv_domain != 'boolean') {
|
||||
|
||||
@@ -1131,8 +1131,8 @@ class ViewTree(View):
|
||||
column.set_visible(False)
|
||||
elif name == self.screen.exclude_field:
|
||||
column.set_visible(False)
|
||||
else:
|
||||
field = self.group.fields.get(name)
|
||||
elif name in self.group.fields:
|
||||
field = self.group.fields[name]
|
||||
inv_domain = domain_inversion(domain, name)
|
||||
if not isinstance(inv_domain, bool):
|
||||
inv_domain = simplify(inv_domain)
|
||||
|
||||
Reference in new issue
Block a user