2012-07-19 08:10:31 +00:00
|
|
|
from __future__ import unicode_literals
|
2012-04-10 10:01:48 +00:00
|
|
|
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"))
|