Add remove_forbidden_chars in tools

issue10684
review371581002
This commit is contained in:
Cédric Krier
2021-09-13 23:43:03 +02:00
parent 04f7bd1ff1
commit e8938a96ff
+2 -5
View File
@@ -37,11 +37,8 @@ def _get_language_codes():
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_countries():