From 891057a861ec7ecda6462a9225829dd17f967a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 7 Sep 2024 16:47:10 +0200 Subject: [PATCH] Do not set default escape char for like operators Backed out changeset 98650685d8ab because it requires python-sql >= 1.4 Closes #13333 --HG-- branch : 6.0 --- trytond/trytond/model/fields/field.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trytond/trytond/model/fields/field.py b/trytond/trytond/model/fields/field.py index 3c969d05ee..f60f70319a 100644 --- a/trytond/trytond/model/fields/field.py +++ b/trytond/trytond/model/fields/field.py @@ -1,7 +1,7 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. import warnings -from functools import partial, wraps +from functools import wraps import sql from sql import (operators, Column, Literal, Select, CombiningQuery, Null, @@ -204,10 +204,10 @@ def with_inactive_records(func): SQL_OPERATORS = { '=': operators.Equal, '!=': operators.NotEqual, - 'like': partial(operators.Like, escape='\\'), - 'not like': partial(operators.NotLike, escape='\\'), - 'ilike': partial(operators.ILike, escape='\\'), - 'not ilike': partial(operators.NotILike, escape='\\'), + 'like': operators.Like, + 'not like': operators.NotLike, + 'ilike': operators.ILike, + 'not ilike': operators.NotILike, 'in': operators.In, 'not in': operators.NotIn, '<=': operators.LessEqual,