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''' diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 0c4b9518f6..806b489da4 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) @@ -561,6 +557,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) 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