From a3773396f37359eaf020829a3f9cece2e5ff910c Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 29 May 2013 11:41:13 +0530 Subject: [PATCH] [naming series] [fix] added Date in make autoname --- setup/doctype/naming_series/naming_series.py | 13 +++---------- setup/page/setup/setup.js | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/setup/doctype/naming_series/naming_series.py b/setup/doctype/naming_series/naming_series.py index 3a6b36d1ff..eb293f256b 100644 --- a/setup/doctype/naming_series/naming_series.py +++ b/setup/doctype/naming_series/naming_series.py @@ -123,16 +123,9 @@ class DocType: def validate_series_name(self, n): import re - if "." in n: - parts = n.split(".") - if len(parts) > 2: - msgprint("Only one dot (.) allowed in " + n, raise_exception=1) - if not re.match("#+$", parts[-1]): - msgprint("Numbering series must be in hashes (e.g. ####)", raise_exception=1) - n = n[0] - if not re.match("^[a-zA-Z0-9-/]*$", n): - msgprint('Special Characters except "-" and "/" not allowed in naming series') - raise Exception + if not re.match("^[a-zA-Z0-9-/.#]*$", n): + msgprint('Special Characters except "-" and "/" not allowed in naming series', + raise_exception=True) def get_options(self, arg=''): sr = webnotes.model.doctype.get_property(self.doc.select_doc_for_series, diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js index 1ebd7307a6..788021a42a 100644 --- a/setup/page/setup/setup.js +++ b/setup/page/setup/setup.js @@ -73,7 +73,7 @@ wn.module_page["Setup"] = [ { "route":"Form/Naming Series/Naming Series", doctype: "Naming Series", - label: wn._("Manage numbering series"), + label: wn._("Manage Numbering Series"), "description":wn._("Set multiple numbering series for transactions") }, {