fix(patch): Check if meta object has naming_series field (#15651)
diff --git a/erpnext/patches/v11_0/refactor_naming_series.py b/erpnext/patches/v11_0/refactor_naming_series.py
index 428e2c3..b85ab66 100644
--- a/erpnext/patches/v11_0/refactor_naming_series.py
+++ b/erpnext/patches/v11_0/refactor_naming_series.py
@@ -106,6 +106,8 @@
continue
if not frappe.db.has_column(doctype, 'naming_series'):
continue
+ if not frappe.get_meta(doctype).has_field('naming_series'):
+ continue
series_to_preserve = list(filter(None, get_series_to_preserve(doctype)))
default_series = get_default_series(doctype)