mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
merged with master
This commit is contained in:
10
patches/december_2012/file_list_rename.py
Normal file
10
patches/december_2012/file_list_rename.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
for dt in webnotes.conn.sql("""select distinct parent from tabDocField
|
||||
where fieldname='file_list'"""):
|
||||
try:
|
||||
webnotes.conn.sql("""update `tab%s` set file_list =
|
||||
replace(file_list, "-", "")""" % dt[0])
|
||||
except Exception, e:
|
||||
if e.args[0]!=1146: raise e
|
||||
9
patches/december_2012/move_recent_to_memcache.py
Normal file
9
patches/december_2012/move_recent_to_memcache.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import webnotes, json
|
||||
|
||||
def execute():
|
||||
for p in webnotes.conn.sql("""select name, recent_documents from
|
||||
tabProfile where ifnull(recent_documents,'')!=''"""):
|
||||
if not '~~~' in p[1] and p[1][0]=='[':
|
||||
webnotes.cache().set_value("recent:" + p[0], json.loads(p[1]))
|
||||
5
patches/december_2012/replace_createlocal.py
Normal file
5
patches/december_2012/replace_createlocal.py
Normal file
@@ -0,0 +1,5 @@
|
||||
def execute():
|
||||
import webnotes
|
||||
webnotes.conn.sql("""update `tabCustom Script`
|
||||
set script = replace(script, 'createLocal', 'wn.model.make_new_doc_and_get_name')
|
||||
where script_type='Client'""")
|
||||
@@ -530,4 +530,12 @@ patch_list = [
|
||||
'patch_module': 'patches.december_2012',
|
||||
'patch_file': 'fix_default_print_format',
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.december_2012',
|
||||
'patch_file': 'file_list_rename',
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.december_2012',
|
||||
'patch_file': 'replace_createlocal',
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user