mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +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)
|
||||||
|
|
||||||
@@ -642,5 +642,9 @@ patch_list = [
|
|||||||
{
|
{
|
||||||
'patch_module': 'patches.october_2012',
|
'patch_module': 'patches.october_2012',
|
||||||
'patch_file': 'custom_script_delete_permission',
|
'patch_file': 'custom_script_delete_permission',
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.november_2012',
|
||||||
|
'patch_file': 'custom_field_insert_after',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user