from __future__ import unicode_literals def execute(): import webnotes rendt = { 'Receivable Voucher' : 'Sales Invoice', 'RV Detail' : 'Sales Invoice Item', 'RV Tax Detail' : 'Sales Taxes and Charges', 'Payable Voucher' : 'Purchase Invoice', 'PV Detail' : 'Purchase Invoice Item', 'Purchase Tax Detail' : 'Purchase Taxes and Charges', 'Indent' : 'Material Request', 'Indent Detail' : 'Material Request Item', 'QA Inspection Report' : 'Quality Inspection', 'Ticket' : 'Task', 'Manage Account' : 'Global Defaults', 'ToDo Item' : 'ToDo', 'Term' : 'Terms and Conditions', 'Static Parameter Detail' : 'SMS Parameter', 'SS Earning Detail' : 'Salary Slip Earning', 'SS Deduction Detail' : 'Salary Slip Deduction', 'Sales Order Detail' : 'Sales Order Item', 'Sales BOM Detail' : 'Sales BOM Item', 'Return Detail' : 'Sales and Purchase Return Item', 'Ref Rate Detail' : 'Item Price', 'Receiver Detail' : 'SMS Receiver', 'Quotation Detail' : 'Quotation Item', 'QA Specification Detail' : 'Quality Inspection Reading', 'Purchase Receipt Detail' : 'Purchase Receipt Item', 'Purchase Other Charges' : 'Purchase Taxes and Charges Master', 'PR Raw Material Detail' : 'Purchase Receipt Item Supplied', 'PP SO Detail' : 'Production Plan Sales Order', 'PP Detail' : 'Production Plan Item', 'PO Raw Material Detail' : 'Purchase Order Item Supplied', 'PO Detail' : 'Purchase Order Item', 'Packing Slip Detail' : 'Packing Slip Item', 'Other Charges' : 'Sales Taxes and Charges Master', 'Order Lost Reason' : 'Quotation Lost Reason', 'Manage Account' : 'Global Defaults', 'Maintenance Visit Detail' : 'Maintenance Visit Purpose', 'Ledger Balance Export' : 'Multi Ledger Report', 'LC PR Detail' : 'Landed Cost Purchase Receipt', 'Landed Cost Detail' : 'Landed Cost Item', 'KRA Template' : 'Appraisal Template', 'KRA Sheet' : 'Appraisal Template Goal', 'Item Specification Detail' : 'Item Quality Inspection Parameter', 'Item Maintenance Detail' : 'Maintenance Schedule Item', 'IR Payment Detail' : 'Payment to Invoice Matching Tool Detail', 'Internal Reconciliation' : 'Payment to Invoice Matching Tool', 'Installed Item Details' : 'Installation Note Item', 'Holiday List Detail' : 'Holiday', 'Follow up' : 'Communication Log', 'Flat BOM Detail' : 'BOM Explosion Item', 'Expense Voucher Detail' : 'Expense Claim Detail', 'Expense Voucher' : 'Expense Claim', 'Expense Type' : 'Expense Claim Type', 'Enquiry Detail' : 'Opportunity Item', 'Enquiry' : 'Opportunity', 'Earning Detail' : 'Salary Structure Earning', 'DocLayerField' : 'Customize Form Field', 'DocLayer' : 'Customize Form', 'Delivery Note Detail' : 'Delivery Note Item', 'Deduction Detail' : 'Salary Structure Deduction', 'Comment Widget Record' : 'Comment', 'BOM Material' : 'BOM Item', 'Bill Of Materials' : 'BOM', 'Appraisal Detail' : 'Appraisal Goal', 'Advance Allocation Detail' : 'Purchase 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', 'Educational Qualifications Detail' : 'Employee Education', 'Delivery Note Packing Detail' : 'Delivery Note Packing Item', 'Experience In Company Detail' : 'Employee Internal Work History', 'Professional Training Details' : 'Employee Training', 'Previous Experience Detail' : 'Employee External Work History', } for d in rendt: webnotes.conn.sql(""" update `tabSearch Criteria` set doc_type = replace(doc_type, %s, %s), filters = replace(filters, %s, %s), columns = replace(columns, %s, %s), parent_doc_type = replace(parent_doc_type, %s, %s), add_cond = replace(add_cond, %s, %s), add_col = replace(add_col, %s, %s), add_tab = replace(add_tab, %s, %s), dis_filters = replace(dis_filters, %s, %s), group_by = replace(group_by, %s, %s), sort_by = replace(sort_by, %s, %s), report_script = replace(report_script, %s, %s), server_script = replace(server_script, %s, %s), custom_query = replace(custom_query, %s, %s) """, (d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d]))