diff options
Diffstat (limited to 'odoo/models.py')
| -rw-r--r-- | odoo/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/odoo/models.py b/odoo/models.py index d77c22f4dad..59b7f8e9858 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -5296,6 +5296,9 @@ Fields: result.append(self.browse()) else: (key, comparator, value) = d + if comparator in ('child_of', 'parent_of'): + result.append(self.search([('id', 'in', self.ids), d])) + continue if key.endswith('.id'): key = key[:-3] if key == 'id': @@ -5312,9 +5315,6 @@ Fields: records_ids = OrderedSet() for rec in self: data = rec.mapped(key) - if comparator in ('child_of', 'parent_of'): - value = data.search([(data._parent_name, comparator, value)]).ids - comparator = 'in' if isinstance(data, BaseModel): v = value if (isinstance(value, list) or isinstance(value, tuple)) and len(value): |
