fix in insert after of custom field

This commit is contained in:
Anand Doshi
2012-11-01 12:11:16 +05:30
parent 39cfc5865e
commit 7a617b83fb
3 changed files with 16 additions and 1 deletions

View File

View File

@@ -0,0 +1,11 @@
import webnotes
def execute():
import re
regex = re.compile("\s-\s[\d\.]*")
for name, insert_after in webnotes.conn.sql("""select name, insert_after
from `tabCustom Field`"""):
new_insert_after = regex.sub("", insert_after)
webnotes.conn.set_value("Custom Field", name, "insert_after", new_insert_after)