fix in naming series
diff --git a/setup/doctype/naming_series/naming_series.js b/setup/doctype/naming_series/naming_series.js
index 4a741e4..07d6f82 100644
--- a/setup/doctype/naming_series/naming_series.js
+++ b/setup/doctype/naming_series/naming_series.js
@@ -17,6 +17,7 @@
// Settings
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn){
cur_frm.call({
+ doc: cur_frm.doc,
method: 'get_transactions',
callback: function(r) {
cur_frm.cscript.update_selects(r);
diff --git a/setup/doctype/naming_series/naming_series.py b/setup/doctype/naming_series/naming_series.py
index a259c84..dbbc298 100644
--- a/setup/doctype/naming_series/naming_series.py
+++ b/setup/doctype/naming_series/naming_series.py
@@ -29,10 +29,15 @@
def get_transactions(self, arg=None):
return {
- "transactions": "\n".join([''] + [i[0] for i in sql("""select `tabDocField`.`parent`
- FROM `tabDocField`, `tabDocType` WHERE `tabDocField`.`fieldname` = 'naming_series'
- and `tabDocType`.name=`tabDocField`.parent order by `tabDocField`.parent""")]),
- "prefixes": "\n".join([''] + [i[0] for i in sql("""select name from tabSeries""")])}
+ "transactions": "\n".join([''] + [i[0] for i in
+ sql("""select `tabDocField`.`parent`
+ FROM `tabDocField`, `tabDocType`
+ WHERE `tabDocField`.`fieldname` = 'naming_series'
+ and `tabDocType`.name=`tabDocField`.parent
+ order by `tabDocField`.parent""")]),
+ "prefixes": "\n".join([''] + [i[0] for i in
+ sql("""select name from tabSeries""")])
+ }
def scrub_options_list(self, ol):
options = filter(lambda x: x, [cstr(n.upper()).strip() for n in ol])