From e5e80a27a3abd809c5b2ad329eb3f29a9a5683e7 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 6 Feb 2015 12:55:52 +0530 Subject: [PATCH] Allow non-english field names in Custom Field #919 --- frappe/model/db_schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/model/db_schema.py b/frappe/model/db_schema.py index 2c263e536f..cc85716c91 100644 --- a/frappe/model/db_schema.py +++ b/frappe/model/db_schema.py @@ -8,6 +8,7 @@ Syncs a database table to the `DocType` (metadata) .. note:: This module is only used internally """ +import re import os import frappe from frappe import _ @@ -401,8 +402,7 @@ class DbManager: def validate_column_name(n): n = n.replace(' ','_').strip().lower() - import re - if re.search("[\W]", n): + if re.search("[\W]", n, re.UNICODE): frappe.throw(_("Fieldname {0} cannot contain letters, numbers or spaces").format(n), InvalidColumnName) return n