From f82b1cc4bd04ab9be4f30882b0ce538e510d12b3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 5 Aug 2011 13:23:14 +0530 Subject: [PATCH] old_parent field in account is linked to Account now, it will fix account renaming bug --- accounts/doctype/account/account.txt | 5 +++-- patches/patch.py | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/accounts/doctype/account/account.txt b/accounts/doctype/account/account.txt index b29c61782f..bf48a24d0c 100644 --- a/accounts/doctype/account/account.txt +++ b/accounts/doctype/account/account.txt @@ -455,7 +455,8 @@ 'description': "Don't delete this field at any cost", 'doctype': 'DocField', 'fieldname': 'old_parent', - 'fieldtype': 'Data', + 'fieldtype': 'Link', + 'options': 'Account', 'hidden': 1, 'idx': 24, 'label': 'Old Parent', @@ -517,4 +518,4 @@ 'oldfieldtype': 'Small Text', 'permlevel': 1 } -] \ No newline at end of file +] diff --git a/patches/patch.py b/patches/patch.py index 40e7d3a004..be26d717f6 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1,7 +1,7 @@ # REMEMBER to update this # ======================== -last_patch = 334 +last_patch = 335 #------------------------------------------- @@ -1345,3 +1345,5 @@ def execute(patch_no): p.add_permission('Print Format', 'System Manager', 0, read = 1, write=1, create=1) elif patch_no == 334: reload_doc('knowledge_base', 'doctype', 'answer') + elif patch_no == 335: + sql("update `tabDocField` set fieldtype = 'Link', options = 'Account' where fieldname = 'old_parent' and parent = 'Account'")