From a28e366c1570bb9328427b30c1d24e57c45d4f2f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 22 Sep 2011 16:32:02 +0530 Subject: [PATCH] deleted duplicate button fron JV --- erpnext/patches/patch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/patch.py b/erpnext/patches/patch.py index 9f660355056..8880e7dc1f4 100644 --- a/erpnext/patches/patch.py +++ b/erpnext/patches/patch.py @@ -1,7 +1,7 @@ # REMEMBER to update this # ======================== -last_patch = 371 +last_patch = 372 #------------------------------------------- @@ -375,3 +375,8 @@ def execute(patch_no): prev_fy = f[0] sql("commit") sql("start transaction") + elif patch_no == 372: + if sql("select count(name) from `tabDocField` where label = 'View Ledger Entry' and parent = 'Journal Voucher' and fieldtype = 'Button'")[0][0] > 1: + sql("delete from `tabDocField` where label = 'View Ledger Entry' and parent = 'Journal Voucher' and fieldtype = 'Button' limit 1") + if sql("select count(name) from `tabDocField` where label = 'Get Balance' and parent = 'Journal Voucher' and fieldtype = 'Button'")[0][0] > 1: + sql("delete from `tabDocField` where label = 'Get Balance' and parent = 'Journal Voucher' and fieldtype = 'Button' limit 1")