Allow non-english characters in Naming Series

This commit is contained in:
Anand Doshi 2015-02-06 12:56:26 +05:30
parent 9b30a8626c
commit e241569303

View File

@ -117,8 +117,8 @@ class NamingSeries(Document):
def validate_series_name(self, n):
import re
if not re.match("^[a-zA-Z0-9- /.#]*$", n):
throw(_('Special Characters except "-" and "/" not allowed in naming series'))
if not re.match("^[\w- /.#]*$", n, re.UNICODE):
throw(_('Special Characters except "-", "#", "." and "/" not allowed in naming series'))
def get_options(self, arg=None):
return frappe.get_meta(arg or self.select_doc_for_series).get_field("naming_series").options