From c3c344c658ef8d77363cb7dcbc1b4f987bebd3d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 22 Nov 2012 22:42:45 +0100 Subject: [PATCH] Prevent fuzzing translations when copying review590005 --- trytond/model/modelstorage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py index 7d0e44475c..a57207a957 100644 --- a/trytond/model/modelstorage.py +++ b/trytond/model/modelstorage.py @@ -311,7 +311,10 @@ class ModelStorage(Model): ('code', '=', CONFIG['language']), ]) for lang in langs: - with Transaction().set_context(language=lang.code): + # Prevent fuzzing translations when copying as the terms + # should be the same. + with Transaction().set_context(language=lang.code, + fuzzy_translation=False): datas = cls.read(ids, fields_names=fields_translate.keys() + ['id']) for data in datas: