new rename doc function
This commit is contained in:
parent
002191f166
commit
9c011f405d
@ -1,6 +1,6 @@
|
||||
import webnotes
|
||||
import conf
|
||||
from webnotes.model import rename, delete_doc
|
||||
import webnotes.model
|
||||
from webnotes.model.code import get_obj
|
||||
from wnf import replace_code
|
||||
from termcolor import colored
|
||||
@ -150,10 +150,13 @@ def rename_in_db(ren_data, data_type, is_doctype):
|
||||
print colored('Renaming... ' + d + ' --> '+ ren_data[d], 'yellow')
|
||||
#rename
|
||||
try:
|
||||
rename(data_type, d, ren_data[d], is_doctype)
|
||||
webnotes.model.rename(data_type, d, ren_data[d], is_doctype)
|
||||
except Exception, e:
|
||||
print e
|
||||
pass
|
||||
if e.args[0]!=1050:
|
||||
raise e
|
||||
else:
|
||||
print e
|
||||
pass
|
||||
|
||||
|
||||
def update_dt_in_records(rendt):
|
||||
|
@ -227,16 +227,16 @@ patch_list = [
|
||||
'patch_file': 'so_rv_mapper_fix',
|
||||
'description': 'SO-RV duplicate mapper entry removal'
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.jan_mar_2012',
|
||||
'patch_file': 'sync_ref_db',
|
||||
'description': 'Deletes non required doctypes'
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.mar_2012',
|
||||
'patch_file': 'clean_property_setter',
|
||||
'description': 'Patch related to property setter cleanup'
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.jan_mar_2012',
|
||||
'patch_file': 'sync_ref_db',
|
||||
'description': 'Deletes non required doctypes'
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.april_2012',
|
||||
'patch_file': 'naming_series_patch',
|
||||
|
Loading…
x
Reference in New Issue
Block a user