mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-19 11:27:55 +00:00
moved directory structure
This commit is contained in:
13
patches/april_2012/naming_series_patch.py
Normal file
13
patches/april_2012/naming_series_patch.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.model.code import get_obj
|
||||
ns_list = webnotes.conn.sql("""\
|
||||
SELECT `tabDocField`.`parent`, `tabDocField`.`options`
|
||||
FROM `tabDocField`, `tabDocType`
|
||||
WHERE `tabDocField`.`fieldname` = 'naming_series'
|
||||
AND `tabDocType`.name=`tabDocField`.parent""")
|
||||
ns_obj = get_obj('Naming Series')
|
||||
for ns in ns_list:
|
||||
if ns[0] and isinstance(ns[1], basestring):
|
||||
ns_obj.set_series_for(ns[0], ns[1].split("\n"))
|
||||
Reference in New Issue
Block a user