Patch to set calculate_depreciation if schedule already exists (#12061)

diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 144a53e..2b6452d 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -482,4 +482,5 @@
 erpnext.patches.v10_0.setup_vat_for_uae_and_saudi_arabia
 erpnext.patches.v10_0.set_primary_contact_for_customer
 erpnext.patches.v10_0.copy_projects_renamed_fields
-erpnext.patches.v10_0.enabled_regional_print_format_based_on_country
\ No newline at end of file
+erpnext.patches.v10_0.enabled_regional_print_format_based_on_country
+erpnext.patches.v10_0.update_asset_calculate_depreciation
diff --git a/erpnext/patches/v10_0/update_asset_calculate_depreciation.py b/erpnext/patches/v10_0/update_asset_calculate_depreciation.py
new file mode 100644
index 0000000..72d7ef6
--- /dev/null
+++ b/erpnext/patches/v10_0/update_asset_calculate_depreciation.py
@@ -0,0 +1,8 @@
+import frappe
+
+def execute():
+	frappe.db.sql("""
+		update tabAsset a
+		set calculate_depreciation = 1
+		where exists(select ds.name from `tabDepreciation Schedule` ds where ds.parent=a.name)
+	""")
\ No newline at end of file