mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 13:24:47 +00:00
fix in insert after of custom field
This commit is contained in:
0
patches/november_2012/__init__.py
Normal file
0
patches/november_2012/__init__.py
Normal file
11
patches/november_2012/custom_field_insert_after.py
Normal file
11
patches/november_2012/custom_field_insert_after.py
Normal 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)
|
||||
|
||||
Reference in New Issue
Block a user