Merge pull request #8505 from nabinhait/develop

Fixed allow_zero_valuation_rate patch
diff --git a/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py b/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py
index 744cfed..e517df5 100644
--- a/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py
+++ b/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py
@@ -9,4 +9,5 @@
 	
 	for doctype in doc_list:
 		frappe.reload_doctype(doctype)
-		rename_field(doctype, "is_sample_item", "allow_zero_valuation_rate")
\ No newline at end of file
+		if "is_sample_item" in frappe.db.get_table_columns(doctype):
+			rename_field(doctype, "is_sample_item", "allow_zero_valuation_rate")
\ No newline at end of file