changeset 7e5a44176bd4 in modules/currency:default
details: https://hg.tryton.org/modules/currency?cmd=changeset&node=7e5a44176bd4
description:
        Add remove_forbidden_chars in tools

        issue10684
        review371581002
diffstat:

 scripts/import_currencies.py |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (17 lines):

diff -r d657d097b796 -r 7e5a44176bd4 scripts/import_currencies.py
--- a/scripts/import_currencies.py      Sat Aug 21 09:09:55 2021 +0200
+++ b/scripts/import_currencies.py      Mon Sep 13 23:43:03 2021 +0200
@@ -38,11 +38,8 @@
 
 
 def _remove_forbidden_chars(name):
-    from trytond.model.fields import Char
-    for c in Char.forbidden_chars:
-        if c in name:
-            name.replace(c, ' ')
-    return name.strip()
+    from trytond.tools import remove_forbidden_chars
+    return remove_forbidden_chars(name)
 
 
 def get_currencies():

Reply via email to