old_parent field in account is linked to Account now, it will fix account renaming bug
diff --git a/accounts/doctype/account/account.txt b/accounts/doctype/account/account.txt
index b29c617..bf48a24 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 40e7d3a..be26d71 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 @@
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'")