rename dt error fixed
diff --git a/erpnext/patches/jan_mar_2012/rename_dt.py b/erpnext/patches/jan_mar_2012/rename_dt.py
index 80cad95..368cb4f 100644
--- a/erpnext/patches/jan_mar_2012/rename_dt.py
+++ b/erpnext/patches/jan_mar_2012/rename_dt.py
@@ -8,9 +8,13 @@
# delete dt
#-------------
- deldt = ['Widget Control', 'Update Delivery Date Detail', 'Update Delivery Date', 'Tag Detail', 'Supplier rating', 'Stylesheet', 'Question Tag', 'PRO PP Detail', 'PRO Detail', 'PPW Detail', 'PF Detail', 'Personalize', 'Patch Util', 'Page Template', 'Module Def Role', 'Module Def Item', 'File Group', 'File Browser Control', 'File', 'Educational Qualifications', 'Earn Deduction Detail', 'DocType Property Setter', 'DocFormat', 'Contact Detail', 'BOM Report Detail', 'BOM Replace Utility Detail', 'BOM Replace Utility', 'Absent Days Detail', 'Activity Dashboard Control', 'Raw Materials Supplied', 'Setup Wizard Control', 'Company Group']
+ del_mapper = ['Production Forecast-Production Planning Tool', 'Production Forecast-Production Plan']
+ for d in del_mapper:
+ delete_doc('DocType Mapper', d)
- for d in deldt:
+ del_dt = ['Widget Control', 'Update Delivery Date Detail', 'Update Delivery Date', 'Tag Detail', 'Supplier rating', 'Stylesheet', 'Question Tag', 'PRO PP Detail', 'PRO Detail', 'PPW Detail', 'PF Detail', 'Personalize', 'Patch Util', 'Page Template', 'Module Def Role', 'Module Def Item', 'File Group', 'File Browser Control', 'File', 'Educational Qualifications', 'Earn Deduction Detail', 'DocType Property Setter', 'Contact Detail', 'BOM Report Detail', 'BOM Replace Utility Detail', 'BOM Replace Utility', 'Absent Days Detail', 'Activity Dashboard Control', 'Raw Materials Supplied', 'Setup Wizard Control', 'Company Group'] # docformat
+
+ for d in del_dt:
delete_doc('DocType', d)
@@ -82,7 +86,7 @@
'Bill Of Materials' : 'BOM',
'Appraisal Detail' : 'Appraisal Goal',
'Advance Allocation Detail' : 'Purchase Invoice Advance',
- 'Advance Adjustment Detail' : 'Sales Invoice Advance'
+ 'Advance Adjustment Detail' : 'Sales Invoice Advance',
'Ledger Detail' : 'Multi Ledger Report Detail',
'TA Control' : 'Trend Analyzer Control',
'Sales and Purchase Return Wizard' : 'Sales and Purchase Return Tool',
@@ -94,6 +98,8 @@
}
for d in rendt:
+ print d + ' --------> '+ rendt[d]
+
#rename
rename('DocType', d, rendt[d], 1)
@@ -105,6 +111,7 @@
# RUN ONLY IN LOCAL
######################
+
# replace dt in js/py file
for extn in ['js', 'py', 'txt']:
replace_code('/var/www/erpnext/', d, rendt[d], extn)
diff --git a/wnf.py b/wnf.py
index 463ecc4..3d26f5b 100755
--- a/wnf.py
+++ b/wnf.py
@@ -49,11 +49,11 @@
a = raw_input('Do you want to Change [y/n]?')
if a=='y':
c = c.replace(txt1, txt2)
- tmp.append(c)
+ tmp.append(c)
with open(fpath, 'w') as f:
f.write(''.join(tmp))
- print colored('Updated in %s' % fpath, 'green')
+ print colored('Updated', 'green')
def setup_options():