[naming series] [fix] added Date in make autoname
This commit is contained in:
		
							parent
							
								
									8b509f56b7
								
							
						
					
					
						commit
						a3773396f3
					
				| @ -123,16 +123,9 @@ class DocType: | |||||||
| 			 | 			 | ||||||
| 	def validate_series_name(self, n): | 	def validate_series_name(self, n): | ||||||
| 		import re | 		import re | ||||||
| 		if "." in n: | 		if not re.match("^[a-zA-Z0-9-/.#]*$", n): | ||||||
| 			parts = n.split(".") | 			msgprint('Special Characters except "-" and "/" not allowed in naming series', | ||||||
| 			if len(parts) > 2: | 				raise_exception=True) | ||||||
| 				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 |  | ||||||
| 		 | 		 | ||||||
| 	def get_options(self, arg=''): | 	def get_options(self, arg=''): | ||||||
| 		sr = webnotes.model.doctype.get_property(self.doc.select_doc_for_series,  | 		sr = webnotes.model.doctype.get_property(self.doc.select_doc_for_series,  | ||||||
|  | |||||||
| @ -73,7 +73,7 @@ wn.module_page["Setup"] = [ | |||||||
| 			{ | 			{ | ||||||
| 				"route":"Form/Naming Series/Naming Series", | 				"route":"Form/Naming Series/Naming Series", | ||||||
| 				doctype: "Naming Series", | 				doctype: "Naming Series", | ||||||
| 				label: wn._("Manage numbering series"), | 				label: wn._("Manage Numbering Series"), | ||||||
| 				"description":wn._("Set multiple numbering series for transactions") | 				"description":wn._("Set multiple numbering series for transactions") | ||||||
| 			}, | 			}, | ||||||
| 			{ | 			{ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user