Patch: update users report view settings for rename fields

This commit is contained in:
Nabin Hait 2014-06-18 10:29:53 +05:30 committed by Anand Doshi
parent cea571fc31
commit 0c6177dd9a
2 changed files with 13 additions and 0 deletions

View File

@ -61,3 +61,4 @@ erpnext.patches.v4_0.update_custom_print_formats_for_renamed_fields
erpnext.patches.v4_0.update_other_charges_in_custom_purchase_print_formats
erpnext.patches.v4_0.create_price_list_if_missing
execute:frappe.db.sql("update `tabItem` set end_of_life=null where end_of_life='0000-00-00'") #2014-06-16
erpnext.patches.v4_0.update_users_report_view_settings

View File

@ -0,0 +1,12 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
from frappe.model import update_users_report_view_settings
from erpnext.patches.v4_0.fields_to_be_renamed import rename_map
def execute():
for dt, field_list in rename_map.items():
for field in field_list:
update_users_report_view_settings(dt, field[0], field[1])