From c7907aa6ea2b8825976d80a6e2dd686e780b6ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 18 Apr 2022 19:40:01 +0200 Subject: [PATCH] Dumps Dict values in UTF-8 instead of ASCII This is how they are stored in the database and so we must use also the UTF-8 version when using unaccent to properly remove the accents. issue11418 (grafted from db29f8a10314f48f68be5b68ec075ae4f37edb2f) --HG-- branch : 6.0 --- trytond/model/fields/dict.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/model/fields/dict.py b/trytond/model/fields/dict.py index dc7d73c6c7..30f7abd7d1 100644 --- a/trytond/model/fields/dict.py +++ b/trytond/model/fields/dict.py @@ -14,7 +14,8 @@ from .field import Field, SQL_OPERATORS # Use canonical form dumps = partial( - json.dumps, cls=JSONEncoder, separators=(',', ':'), sort_keys=True) + json.dumps, cls=JSONEncoder, separators=(',', ':'), sort_keys=True, + ensure_ascii=False) class ImmutableDict(dict):