diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index e14be4b8146..92e48a0bcd6 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -600,4 +600,8 @@ patch_list = [ 'patch_module': 'patches.september_2012', 'patch_file': 'reload_gross_profit', }, + { + 'patch_module': 'patches.september_2012', + 'patch_file': 'rebuild_trees', + }, ] diff --git a/erpnext/patches/september_2012/rebuild_trees.py b/erpnext/patches/september_2012/rebuild_trees.py new file mode 100644 index 00000000000..8340df76ada --- /dev/null +++ b/erpnext/patches/september_2012/rebuild_trees.py @@ -0,0 +1,9 @@ +def execute(): + from webnotes.utils.nestedset import rebuild_tree + + rebuild_tree("Item Group", "parent_item_group") + rebuild_tree("Customer Group", "parent_customer_group") + rebuild_tree("Territory", "parent_territory") + rebuild_tree("Account", "parent_account") + rebuild_tree("Cost Center", "parent_cost_center") + rebuild_tree("Sales Person", "parent_sales_person") \ No newline at end of file