From a2d8585b072f5d3fb458948a723ce2d6ce71d822 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 20 May 2015 14:32:39 +0530 Subject: [PATCH 1/3] party model patch fix --- erpnext/patches/v4_2/party_model.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/erpnext/patches/v4_2/party_model.py b/erpnext/patches/v4_2/party_model.py index ad5610938e7..27df2be7ff6 100644 --- a/erpnext/patches/v4_2/party_model.py +++ b/erpnext/patches/v4_2/party_model.py @@ -96,15 +96,16 @@ def set_party_in_jv_and_gl_entry(receivable_payable_accounts): frappe.db.commit() def delete_individual_party_account(): - frappe.db.sql("""delete from `tabAccount` acc - where ifnull(acc.master_type, '') in ('Customer', 'Supplier') - and ifnull(acc.master_name, '') != '' - and not exists(select gle.name from `tabGL Entry` gle where gle.account = acc.name)""") + frappe.db.sql("""delete from `tabAccount` + where ifnull(master_type, '') in ('Customer', 'Supplier') + and ifnull(master_name, '') != '' + and not exists(select gle.name from `tabGL Entry` gle + where gle.account = tabAccount.name);""") - accounts_not_deleted = frappe.db.sql_list("""select name from `tabAccount` acc - where ifnull(acc.master_type, '') in ('Customer', 'Supplier') - and ifnull(acc.master_name, '') != '' - and exists(select gle.name from `tabGL Entry` gle where gle.account = acc.name)""") + accounts_not_deleted = frappe.db.sql_list("""select tabAccount.name from `tabAccount` + where ifnull(master_type, '') in ('Customer', 'Supplier') + and ifnull(master_name, '') != '' + and exists(select gle.name from `tabGL Entry` gle where gle.account = tabAccount.name)""") if accounts_not_deleted: print "Accounts not deleted: " + "\n".join(accounts_not_deleted) From 521aa2e94ab6dd14eaf630134b72809b8d32b654 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 20 May 2015 14:39:39 +0530 Subject: [PATCH 2/3] Update party_model.py --- erpnext/patches/v4_2/party_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v4_2/party_model.py b/erpnext/patches/v4_2/party_model.py index 27df2be7ff6..cbb00cf0313 100644 --- a/erpnext/patches/v4_2/party_model.py +++ b/erpnext/patches/v4_2/party_model.py @@ -100,7 +100,7 @@ def delete_individual_party_account(): where ifnull(master_type, '') in ('Customer', 'Supplier') and ifnull(master_name, '') != '' and not exists(select gle.name from `tabGL Entry` gle - where gle.account = tabAccount.name);""") + where gle.account = tabAccount.name)""") accounts_not_deleted = frappe.db.sql_list("""select tabAccount.name from `tabAccount` where ifnull(master_type, '') in ('Customer', 'Supplier') From 38937ecd3cca087464a7f71e46d9f2a300870f80 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Wed, 20 May 2015 17:05:40 +0600 Subject: [PATCH 3/3] bumped to version 5.0.6 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 7d2298fb001..721b4757a22 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1,2 +1,2 @@ from __future__ import unicode_literals -__version__ = '5.0.5' +__version__ = '5.0.6' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index aa8638e63a3..c16d9b1ae60 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "5.0.5" +app_version = "5.0.6" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 669c90190f5..31eea3dd450 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = "5.0.5" +version = "5.0.6" with open("requirements.txt", "r") as f: install_requires = f.readlines()