From f813e2651b76755bb31d9c78b6a080c65cfe1799 Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Thu, 19 Oct 2023 09:16:56 +0200 Subject: [PATCH] [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) Signed-off-by: Jorge Pinna Puissant (jpp) --- addons/project/models/project_task.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/project/models/project_task.py b/addons/project/models/project_task.py index e381bb7879b..d4509a423a4 100644 --- a/addons/project/models/project_task.py +++ b/addons/project/models/project_task.py @@ -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)