From b96e239cc085b7841afdd545b985457d0160738c Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Fri, 4 Aug 2017 11:40:23 +0530 Subject: [PATCH 1/3] [hotfix] ignore if project type is None (#10284) --- erpnext/patches/v8_5/remove_project_type_property_setter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v8_5/remove_project_type_property_setter.py b/erpnext/patches/v8_5/remove_project_type_property_setter.py index 11db783497..03d128d3ec 100644 --- a/erpnext/patches/v8_5/remove_project_type_property_setter.py +++ b/erpnext/patches/v8_5/remove_project_type_property_setter.py @@ -9,7 +9,7 @@ def execute(): project_types = frappe.db.sql_list('select distinct project_type from tabProject') for project_type in project_types: - if not frappe.db.exists("Project Type", project_type): + if project_type and not frappe.db.exists("Project Type", project_type): p_type = frappe.get_doc({ "doctype": "Project Type", "project_type": project_type From 499144fd862543f0ff995e0effcb3d03bb0a18a8 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 4 Aug 2017 12:55:44 +0530 Subject: [PATCH 2/3] Fixed test cases for dynamic link order --- .../doctype/sales_invoice/test_sales_invoice.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 01071c53fc..44a0a8caaa 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -120,10 +120,6 @@ class TestSalesInvoice(unittest.TestCase): pe.insert() pe.submit() - link_data = get_dynamic_link_map().get('Sales Invoice', []) - link_doctypes = [d.parent for d in link_data] - self.assertEquals(link_doctypes[-1], 'GL Entry') - unlink_payment_on_cancel_of_invoice(0) si = frappe.get_doc('Sales Invoice', si.name) self.assertRaises(frappe.LinkExistsError, si.cancel) @@ -490,6 +486,12 @@ class TestSalesInvoice(unittest.TestCase): self.assertEquals(frappe.db.get_value("Sales Invoice", w.name, "outstanding_amount"), 161.8) + link_data = get_dynamic_link_map().get('Sales Invoice', []) + link_doctypes = [d.parent for d in link_data] + + # test case for dynamic link order + self.assertTrue(link_doctypes.index('GL Entry') > link_doctypes.index('Journal Entry Account')) + jv.cancel() self.assertEquals(frappe.db.get_value("Sales Invoice", w.name, "outstanding_amount"), 561.8) From 4796e8e3172b9360b703b9b9c89712b7e7792355 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Fri, 4 Aug 2017 14:38:56 +0600 Subject: [PATCH 3/3] bumped to version 8.7.2 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4d6cccf3df..64bfa0f077 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '8.7.1' +__version__ = '8.7.2' def get_default_company(user=None): '''Get default company for user'''