diff --git a/erpnext/patches/v11_0/make_location_from_warehouse.py b/erpnext/patches/v11_0/make_location_from_warehouse.py index b5b2e17c3b..a307e8c365 100644 --- a/erpnext/patches/v11_0/make_location_from_warehouse.py +++ b/erpnext/patches/v11_0/make_location_from_warehouse.py @@ -6,6 +6,7 @@ import frappe from frappe.utils.nestedset import rebuild_tree def execute(): + if not frappe.db.get_value('Asset', {'docstatus': ('<', 2) }, 'name'): return frappe.reload_doc('assets', 'doctype', 'location') frappe.reload_doc('stock', 'doctype', 'warehouse')