[FIX] project: operator should use in or not
Before this commit, the domain term was using = or != as an operator with an array as a right expression. This creates a warning in the log when normalizing the leaf of the domain. Now, the operations = or != are replaced by in or not in. closes odoo/odoo#139032 Related: odoo/enterprise#49115 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit is contained in:
@@ -1138,6 +1138,10 @@ class Task(models.Model):
|
||||
if isinstance(value, str) or (isinstance(value, list) and not all(isinstance(val, str) for val in value)):
|
||||
new_domain.append(("name", op, value))
|
||||
if isinstance(value, int):
|
||||
if op == "=":
|
||||
op = "in"
|
||||
if op == "!=":
|
||||
op = "not in"
|
||||
new_domain.append(("id", op, [value]))
|
||||
else:
|
||||
new_domain.append(dom)
|
||||
|
||||
Reference in New Issue
Block a user