mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
[autoname] [cleanup] strip blank spaces and remove autoname where naming_series: can be set in doctype
This commit is contained in:
@@ -18,7 +18,6 @@ from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import getdate, nowdate
|
||||
from webnotes.model.doc import make_autoname
|
||||
from webnotes import msgprint, _
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
@@ -28,9 +27,6 @@ class DocType:
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
|
||||
def autoname(self):
|
||||
self.doc.name = make_autoname(self.doc.naming_series+'.#####')
|
||||
|
||||
def get_emp_name(self):
|
||||
return {
|
||||
"employee_name": webnotes.conn.get_value("Employee",
|
||||
|
||||
@@ -36,7 +36,7 @@ class DocType:
|
||||
if ret[0][0]=='Naming Series':
|
||||
self.doc.name = make_autoname(self.doc.naming_series + '.####')
|
||||
elif ret[0][0]=='Employee Number':
|
||||
self.doc.name = make_autoname(self.doc.employee_number)
|
||||
self.doc.name = self.doc.employee_number
|
||||
|
||||
self.doc.employee = self.doc.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user